1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck %s
5 @addr = global ptr null
7 define void @test_blockaddress() {
8 store ptr blockaddress(@test_blockaddress, %block), ptr @addr
9 indirectbr ptr blockaddress(@test_blockaddress, %block), [label %block]
17 name: test_blockaddress
19 tracksRegLiveness: true
22 ; CHECK-LABEL: name: test_blockaddress
23 ; CHECK: [[BLOCK_ADDR:%[0-9]+]]:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
24 ; CHECK-NEXT: S_ENDPGM 0, implicit [[BLOCK_ADDR]](p0)
25 %0:_(p0) = G_BLOCK_ADDR blockaddress(@test_blockaddress, %ir-block.block)
26 S_ENDPGM 0, implicit %0