1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefixes=GCN %s
3 # XUN: llc -march=amdgcn -mcpu=hawaii -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*' -o /dev/null %s 2>&1 | FileCheck -check-prefixes=ERR %s
5 # G_IMPLICIT_DEF should probably never be produced for scc. Make sure there's no crash.
6 # ERR: remark: <unknown>:0:0: cannot select: %0:scc(s1) = G_IMPLICIT_DEF (in function: implicit_def_s1_scc)
11 name: implicit_def_s32_sgpr
17 ; GCN-LABEL: name: implicit_def_s32_sgpr
18 ; GCN: [[DEF:%[0-9]+]]:sreg_32 = IMPLICIT_DEF
19 ; GCN: S_ENDPGM 0, implicit [[DEF]]
20 %0:sgpr(s32) = G_IMPLICIT_DEF
21 S_ENDPGM 0, implicit %0
25 name: implicit_def_s32_vgpr
31 ; GCN-LABEL: name: implicit_def_s32_vgpr
32 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
33 ; GCN: S_ENDPGM 0, implicit [[DEF]]
34 %0:vgpr(s32) = G_IMPLICIT_DEF
35 S_ENDPGM 0, implicit %0
40 name: implicit_def_s64_sgpr
46 ; GCN-LABEL: name: implicit_def_s64_sgpr
47 ; GCN: [[DEF:%[0-9]+]]:sreg_64_xexec = IMPLICIT_DEF
48 ; GCN: S_ENDPGM 0, implicit [[DEF]]
49 %0:sgpr(s64) = G_IMPLICIT_DEF
50 S_ENDPGM 0, implicit %0
55 name: implicit_def_s64_vgpr
61 ; GCN-LABEL: name: implicit_def_s64_vgpr
62 ; GCN: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
63 ; GCN: S_ENDPGM 0, implicit [[DEF]]
64 %0:vgpr(s64) = G_IMPLICIT_DEF
65 S_ENDPGM 0, implicit %0
69 name: implicit_def_p0_sgpr
75 ; GCN-LABEL: name: implicit_def_p0_sgpr
76 ; GCN: [[DEF:%[0-9]+]]:sreg_64_xexec = IMPLICIT_DEF
77 ; GCN: S_ENDPGM 0, implicit [[DEF]]
78 %0:sgpr(p0) = G_IMPLICIT_DEF
79 S_ENDPGM 0, implicit %0
83 name: implicit_def_p0_vgpr
89 ; GCN-LABEL: name: implicit_def_p0_vgpr
90 ; GCN: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
91 ; GCN: S_ENDPGM 0, implicit [[DEF]]
92 %0:vgpr(p0) = G_IMPLICIT_DEF
93 S_ENDPGM 0, implicit %0
98 name: implicit_def_p1_vgpr
100 regBankSelected: true
104 ; GCN-LABEL: name: implicit_def_p1_vgpr
105 ; GCN: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
106 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4, implicit $exec
107 ; GCN: FLAT_STORE_DWORD [[DEF]], [[V_MOV_B32_e32_]], 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4, addrspace 1)
108 %0:vgpr(p1) = G_IMPLICIT_DEF
109 %1:vgpr(s32) = G_CONSTANT i32 4
110 G_STORE %1, %0 :: (store 4, addrspace 1)
115 name: implicit_def_p3_vgpr
117 regBankSelected: true
121 ; GCN-LABEL: name: implicit_def_p3_vgpr
122 ; GCN: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
123 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4, implicit $exec
124 ; GCN: $m0 = S_MOV_B32 -1
125 ; GCN: FLAT_STORE_DWORD [[DEF]], [[V_MOV_B32_e32_]], 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4, addrspace 1)
126 %0:vgpr(p3) = G_IMPLICIT_DEF
127 %1:vgpr(s32) = G_CONSTANT i32 4
128 G_STORE %1, %0 :: (store 4, addrspace 1)
133 name: implicit_def_p4_vgpr
135 regBankSelected: true
139 ; GCN-LABEL: name: implicit_def_p4_vgpr
140 ; GCN: [[DEF:%[0-9]+]]:vreg_64 = IMPLICIT_DEF
141 ; GCN: [[V_MOV_B32_e32_:%[0-9]+]]:vgpr_32 = V_MOV_B32_e32 4, implicit $exec
142 ; GCN: FLAT_STORE_DWORD [[DEF]], [[V_MOV_B32_e32_]], 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4, addrspace 1)
143 %0:vgpr(p4) = G_IMPLICIT_DEF
144 %1:vgpr(s32) = G_CONSTANT i32 4
145 G_STORE %1, %0 :: (store 4, addrspace 1)
150 name: implicit_def_s1_vgpr
152 regBankSelected: true
156 ; GCN-LABEL: name: implicit_def_s1_vgpr
157 ; GCN: [[DEF:%[0-9]+]]:vgpr_32 = IMPLICIT_DEF
158 ; GCN: S_ENDPGM 0, implicit [[DEF]]
159 %0:vgpr(s1) = G_IMPLICIT_DEF
160 S_ENDPGM 0, implicit %0
165 name: implicit_def_s1_sgpr
167 regBankSelected: true
171 ; GCN-LABEL: name: implicit_def_s1_sgpr
172 ; GCN: [[DEF:%[0-9]+]]:sreg_32 = IMPLICIT_DEF
173 ; GCN: S_ENDPGM 0, implicit [[DEF]]
174 %0:sgpr(s1) = G_IMPLICIT_DEF
175 S_ENDPGM 0, implicit %0
180 name: implicit_def_s1_scc
182 regBankSelected: true
186 ; GCN-LABEL: name: implicit_def_s1_scc
187 ; GCN: [[DEF:%[0-9]+]]:sgpr_32 = IMPLICIT_DEF
188 ; GCN: S_ENDPGM 0, implicit [[DEF]]
189 %0:scc(s1) = G_IMPLICIT_DEF
190 S_ENDPGM 0, implicit %0
195 name: implicit_def_s1_vcc
197 regBankSelected: true
201 ; GCN-LABEL: name: implicit_def_s1_vcc
202 ; GCN: [[DEF:%[0-9]+]]:sreg_64_xexec = IMPLICIT_DEF
203 ; GCN: S_ENDPGM 0, implicit [[DEF]]
204 %0:vcc(s1) = G_IMPLICIT_DEF
205 S_ENDPGM 0, implicit %0
210 name: implicit_def_s1024_sgpr
212 regBankSelected: true
216 ; GCN-LABEL: name: implicit_def_s1024_sgpr
217 ; GCN: [[DEF:%[0-9]+]]:sreg_1024 = IMPLICIT_DEF
218 ; GCN: S_ENDPGM 0, implicit [[DEF]]
219 %0:sgpr(s1024) = G_IMPLICIT_DEF
220 S_ENDPGM 0, implicit %0
224 name: implicit_def_s1024_vgpr
226 regBankSelected: true
230 ; GCN-LABEL: name: implicit_def_s1024_vgpr
231 ; GCN: [[DEF:%[0-9]+]]:vreg_1024 = IMPLICIT_DEF
232 ; GCN: S_ENDPGM 0, implicit [[DEF]]
233 %0:vgpr(s1024) = G_IMPLICIT_DEF
234 S_ENDPGM 0, implicit %0