1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
5 name: return_address_already_live_in_copy
8 tracksRegLiveness: true
10 - { reg: '$sgpr30_sgpr31', virtual-reg: '%0' }
14 liveins: $sgpr30_sgpr31
15 ; CHECK-LABEL: name: return_address_already_live_in_copy
16 ; CHECK: liveins: $sgpr30_sgpr31
18 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr30_sgpr31
19 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]], implicit [[COPY]]
20 %0:sgpr(p0) = COPY $sgpr30_sgpr31
21 %1:sgpr(p0) = G_INTRINSIC intrinsic(@llvm.returnaddress), 0
22 S_ENDPGM 0, implicit %0, implicit %1
26 name: return_address_already_block_live_in_copy_not_mf_life_in
29 tracksRegLiveness: true
33 liveins: $sgpr30_sgpr31
34 ; CHECK-LABEL: name: return_address_already_block_live_in_copy_not_mf_life_in
35 ; CHECK: liveins: $sgpr30_sgpr31
37 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr30_sgpr31
38 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr30_sgpr31
39 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]], implicit [[COPY]]
40 %0:sgpr(p0) = COPY $sgpr30_sgpr31
41 %1:sgpr(p0) = G_INTRINSIC intrinsic(@llvm.returnaddress), 0
42 S_ENDPGM 0, implicit %0, implicit %1
46 name: return_address_no_live_in
49 tracksRegLiveness: true
54 ; CHECK-LABEL: name: return_address_no_live_in
55 ; CHECK: liveins: $sgpr30_sgpr31
57 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr30_sgpr31
58 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]]
59 %0:sgpr(p0) = G_INTRINSIC intrinsic(@llvm.returnaddress), 0
60 S_ENDPGM 0, implicit %0
64 name: return_address_no_live_in_non_entry_block
67 tracksRegLiveness: true
70 ; CHECK-LABEL: name: return_address_no_live_in_non_entry_block
72 ; CHECK-NEXT: successors: %bb.1(0x80000000)
73 ; CHECK-NEXT: liveins: $sgpr30_sgpr31
75 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr30_sgpr31
76 ; CHECK-NEXT: S_BRANCH %bb.1
79 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]]
84 %0:sgpr(p0) = G_INTRINSIC intrinsic(@llvm.returnaddress), 0
85 S_ENDPGM 0, implicit %0
89 name: return_address_multi_use
92 tracksRegLiveness: true
95 ; CHECK-LABEL: name: return_address_multi_use
97 ; CHECK-NEXT: successors: %bb.1(0x80000000)
98 ; CHECK-NEXT: liveins: $sgpr30_sgpr31
100 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr30_sgpr31
101 ; CHECK-NEXT: S_BRANCH %bb.1
104 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]], implicit [[COPY]]
106 %0:sgpr(p0) = G_INTRINSIC intrinsic(@llvm.returnaddress), 0
110 %1:sgpr(p0) = G_INTRINSIC intrinsic(@llvm.returnaddress), 0
111 S_ENDPGM 0, implicit %0, implicit %1
115 name: return_address_kernel_is_null
117 regBankSelected: true
118 tracksRegLiveness: true
120 isEntryFunction: true
124 ; CHECK-LABEL: name: return_address_kernel_is_null
125 ; CHECK: [[S_MOV_B64_:%[0-9]+]]:sreg_64 = S_MOV_B64 0
126 ; CHECK-NEXT: S_ENDPGM 0, implicit [[S_MOV_B64_]]
127 %0:sgpr(p0) = G_INTRINSIC intrinsic(@llvm.returnaddress), 0
128 S_ENDPGM 0, implicit %0