1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX7 %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s
4 # RUN: llc -march=amdgcn -mcpu=hawaii -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX7 %s
5 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GFX8 %s
13 liveins: $sgpr0, $sgpr1
14 ; GFX7-LABEL: name: icmp_eq_s32_ss
15 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
16 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
17 ; GFX7: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
18 ; GFX7: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
19 ; GFX8-LABEL: name: icmp_eq_s32_ss
20 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
21 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
22 ; GFX8: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
23 ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
24 %0:_(s32) = COPY $sgpr0
25 %1:_(s32) = COPY $sgpr1
26 %2:_(s1) = G_ICMP intpred(eq), %0, %1
35 liveins: $sgpr0, $vgpr0
36 ; GFX7-LABEL: name: icmp_eq_s32_sv
37 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
38 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
39 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
40 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY1]]
41 ; GFX8-LABEL: name: icmp_eq_s32_sv
42 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
43 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
44 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
45 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY1]]
46 %0:_(s32) = COPY $sgpr0
47 %1:_(s32) = COPY $vgpr0
48 %2:_(s1) = G_ICMP intpred(eq), %0, %1
57 liveins: $sgpr0, $vgpr0
58 ; GFX7-LABEL: name: icmp_eq_s32_vs
59 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
60 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
61 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
62 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY2]]
63 ; GFX8-LABEL: name: icmp_eq_s32_vs
64 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
65 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
66 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
67 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY2]]
68 %0:_(s32) = COPY $sgpr0
69 %1:_(s32) = COPY $vgpr0
70 %2:_(s1) = G_ICMP intpred(eq), %1, %0
79 liveins: $vgpr0, $vgpr1
80 ; GFX7-LABEL: name: icmp_eq_s32_vv
81 ; GFX7: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
82 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
83 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
84 ; GFX8-LABEL: name: icmp_eq_s32_vv
85 ; GFX8: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
86 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
87 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY1]]
88 %0:_(s32) = COPY $vgpr0
89 %1:_(s32) = COPY $vgpr1
90 %2:_(s1) = G_ICMP intpred(eq), %0, %1
99 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
100 ; GFX7-LABEL: name: icmp_eq_s64_ss
101 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
102 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
103 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
104 ; GFX7: [[COPY3:%[0-9]+]]:vgpr(s64) = COPY [[COPY1]](s64)
105 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s64), [[COPY3]]
106 ; GFX8-LABEL: name: icmp_eq_s64_ss
107 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
108 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
109 ; GFX8: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
110 ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
111 %0:_(s64) = COPY $sgpr0_sgpr1
112 %1:_(s64) = COPY $sgpr2_sgpr3
113 %2:_(s1) = G_ICMP intpred(eq), %0, %1
122 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
123 ; GFX7-LABEL: name: icmp_eq_s64_sv
124 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
125 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
126 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
127 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s64), [[COPY1]]
128 ; GFX8-LABEL: name: icmp_eq_s64_sv
129 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
130 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
131 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
132 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s64), [[COPY1]]
133 %0:_(s64) = COPY $sgpr0_sgpr1
134 %1:_(s64) = COPY $vgpr0_vgpr1
135 %2:_(s1) = G_ICMP intpred(eq), %0, %1
144 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
145 ; GFX7-LABEL: name: icmp_eq_s64_vs
146 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
147 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
148 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
149 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s64), [[COPY2]]
150 ; GFX8-LABEL: name: icmp_eq_s64_vs
151 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
152 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
153 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
154 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s64), [[COPY2]]
155 %0:_(s64) = COPY $sgpr0_sgpr1
156 %1:_(s64) = COPY $vgpr0_vgpr1
157 %2:_(s1) = G_ICMP intpred(eq), %1, %0
166 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
167 ; GFX7-LABEL: name: icmp_eq_s64_vv
168 ; GFX7: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
169 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
170 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
171 ; GFX8-LABEL: name: icmp_eq_s64_vv
172 ; GFX8: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
173 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
174 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
175 %0:_(s64) = COPY $vgpr0_vgpr1
176 %1:_(s64) = COPY $vgpr2_vgpr3
177 %2:_(s1) = G_ICMP intpred(eq), %0, %1
186 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
187 ; GFX7-LABEL: name: icmp_ne_s64_ss
188 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
189 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
190 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
191 ; GFX7: [[COPY3:%[0-9]+]]:vgpr(s64) = COPY [[COPY1]](s64)
192 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY2]](s64), [[COPY3]]
193 ; GFX8-LABEL: name: icmp_ne_s64_ss
194 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
195 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
196 ; GFX8: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
197 ; GFX8: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
198 %0:_(s64) = COPY $sgpr0_sgpr1
199 %1:_(s64) = COPY $sgpr2_sgpr3
200 %2:_(s1) = G_ICMP intpred(ne), %0, %1
209 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
210 ; GFX7-LABEL: name: icmp_ne_s64_sv
211 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
212 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
213 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
214 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY2]](s64), [[COPY1]]
215 ; GFX8-LABEL: name: icmp_ne_s64_sv
216 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
217 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
218 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
219 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY2]](s64), [[COPY1]]
220 %0:_(s64) = COPY $sgpr0_sgpr1
221 %1:_(s64) = COPY $vgpr0_vgpr1
222 %2:_(s1) = G_ICMP intpred(ne), %0, %1
231 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
232 ; GFX7-LABEL: name: icmp_ne_s64_vs
233 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
234 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
235 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
236 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY1]](s64), [[COPY2]]
237 ; GFX8-LABEL: name: icmp_ne_s64_vs
238 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
239 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
240 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
241 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY1]](s64), [[COPY2]]
242 %0:_(s64) = COPY $sgpr0_sgpr1
243 %1:_(s64) = COPY $vgpr0_vgpr1
244 %2:_(s1) = G_ICMP intpred(ne), %1, %0
253 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
254 ; GFX7-LABEL: name: icmp_ne_s64_vv
255 ; GFX7: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
256 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
257 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
258 ; GFX8-LABEL: name: icmp_ne_s64_vv
259 ; GFX8: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
260 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
261 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
262 %0:_(s64) = COPY $vgpr0_vgpr1
263 %1:_(s64) = COPY $vgpr2_vgpr3
264 %2:_(s1) = G_ICMP intpred(ne), %0, %1
268 name: icmp_slt_s64_ss
273 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
274 ; GFX7-LABEL: name: icmp_slt_s64_ss
275 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
276 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
277 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
278 ; GFX7: [[COPY3:%[0-9]+]]:vgpr(s64) = COPY [[COPY1]](s64)
279 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY2]](s64), [[COPY3]]
280 ; GFX8-LABEL: name: icmp_slt_s64_ss
281 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
282 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
283 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
284 ; GFX8: [[COPY3:%[0-9]+]]:vgpr(s64) = COPY [[COPY1]](s64)
285 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY2]](s64), [[COPY3]]
286 %0:_(s64) = COPY $sgpr0_sgpr1
287 %1:_(s64) = COPY $sgpr2_sgpr3
288 %2:_(s1) = G_ICMP intpred(slt), %0, %1
292 name: icmp_slt_s64_sv
297 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
298 ; GFX7-LABEL: name: icmp_slt_s64_sv
299 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
300 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
301 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
302 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY2]](s64), [[COPY1]]
303 ; GFX8-LABEL: name: icmp_slt_s64_sv
304 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
305 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
306 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
307 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY2]](s64), [[COPY1]]
308 %0:_(s64) = COPY $sgpr0_sgpr1
309 %1:_(s64) = COPY $vgpr0_vgpr1
310 %2:_(s1) = G_ICMP intpred(slt), %0, %1
314 name: icmp_slt_s64_vs
319 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
320 ; GFX7-LABEL: name: icmp_slt_s64_vs
321 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
322 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
323 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
324 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY1]](s64), [[COPY2]]
325 ; GFX8-LABEL: name: icmp_slt_s64_vs
326 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
327 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
328 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64)
329 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY1]](s64), [[COPY2]]
330 %0:_(s64) = COPY $sgpr0_sgpr1
331 %1:_(s64) = COPY $vgpr0_vgpr1
332 %2:_(s1) = G_ICMP intpred(slt), %1, %0
336 name: icmp_slt_s64_vv
341 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
342 ; GFX7-LABEL: name: icmp_slt_s64_vv
343 ; GFX7: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
344 ; GFX7: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
345 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
346 ; GFX8-LABEL: name: icmp_slt_s64_vv
347 ; GFX8: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
348 ; GFX8: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
349 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
350 %0:_(s64) = COPY $vgpr0_vgpr1
351 %1:_(s64) = COPY $vgpr2_vgpr3
352 %2:_(s1) = G_ICMP intpred(slt), %0, %1
355 # Result is already constrained to be VCC bank, despite scalar inputs.
357 name: map_icmp_already_vcc_bank_sgpr_inputs
359 tracksRegLiveness: true
362 liveins: $sgpr0, $sgpr1
364 ; GFX7-LABEL: name: map_icmp_already_vcc_bank_sgpr_inputs
365 ; GFX7: liveins: $sgpr0, $sgpr1
366 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
367 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
368 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
369 ; GFX7: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
370 ; GFX7: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
371 ; GFX7: S_ENDPGM 0, implicit [[ICMP]](s1)
372 ; GFX8-LABEL: name: map_icmp_already_vcc_bank_sgpr_inputs
373 ; GFX8: liveins: $sgpr0, $sgpr1
374 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
375 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
376 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
377 ; GFX8: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
378 ; GFX8: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
379 ; GFX8: S_ENDPGM 0, implicit [[ICMP]](s1)
380 %0:_(s32) = COPY $sgpr0
381 %1:_(s32) = COPY $sgpr1
382 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
383 S_ENDPGM 0, implicit %2
386 # Result is already con strained to be VCC bank, despite scalar inputs
387 # and also has a register class.
389 name: map_icmp_already_vcc_regclass_sgpr_inputs
391 tracksRegLiveness: true
394 liveins: $sgpr0, $sgpr1
396 ; GFX7-LABEL: name: map_icmp_already_vcc_regclass_sgpr_inputs
397 ; GFX7: liveins: $sgpr0, $sgpr1
398 ; GFX7: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
399 ; GFX7: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
400 ; GFX7: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
401 ; GFX7: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
402 ; GFX7: [[ICMP:%[0-9]+]]:sreg_64_xexec(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
403 ; GFX7: S_ENDPGM 0, implicit [[ICMP]](s1)
404 ; GFX8-LABEL: name: map_icmp_already_vcc_regclass_sgpr_inputs
405 ; GFX8: liveins: $sgpr0, $sgpr1
406 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
407 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
408 ; GFX8: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
409 ; GFX8: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
410 ; GFX8: [[ICMP:%[0-9]+]]:sreg_64_xexec(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
411 ; GFX8: S_ENDPGM 0, implicit [[ICMP]](s1)
412 %0:_(s32) = COPY $sgpr0
413 %1:_(s32) = COPY $sgpr1
414 %2:sreg_64_xexec(s1) = G_ICMP intpred(eq), %0, %1
415 S_ENDPGM 0, implicit %2