1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -pass-remarks-missed='gisel*' -global-isel-abort=2 -o - %s 2> %t | FileCheck -check-prefix=GFX8 %s
3 # RUN: FileCheck -check-prefixes=ERR,GFX8-ERR %s < %t
5 # RUN: llc -mtriple=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*' -o - %s 2> %t | FileCheck -check-prefix=GFX6 %s
6 # RUN: FileCheck -check-prefixes=ERR,GFX6-ERR %s < %t
11 # GFX6-ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(s64), %1:sgpr (in function: icmp_eq_s64_ss)
12 # GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(ne), %0:sgpr(s64), %1:sgpr (in function: icmp_ne_s64_ss)
13 # GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(slt), %0:sgpr(s64), %1:sgpr (in function: icmp_slt_s64_ss)
14 # GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p0), %1:sgpr (in function: icmp_eq_p0_ss)
15 # GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p1), %1:sgpr (in function: icmp_eq_p1_ss)
16 # GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p999), %1:sgpr (in function: icmp_eq_p999_ss)
18 # GFX8-ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(slt), %0:sgpr(s64), %1:sgpr (in function: icmp_slt_s64_ss)
29 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
31 ; GFX8-LABEL: name: icmp_eq_s64_ss
32 ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
34 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
35 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
36 ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
37 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
38 ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
39 ; GFX6-LABEL: name: icmp_eq_s64_ss
40 ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
42 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
43 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
44 ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]]
45 ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
46 %0:sgpr(s64) = COPY $sgpr0_sgpr1
47 %1:sgpr(s64) = COPY $sgpr2_sgpr3
48 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
49 S_ENDPGM 0, implicit %2
60 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
62 ; GFX8-LABEL: name: icmp_ne_s64_ss
63 ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
65 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
66 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
67 ; GFX8-NEXT: S_CMP_LG_U64 [[COPY]], [[COPY1]], implicit-def $scc
68 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
69 ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
70 ; GFX6-LABEL: name: icmp_ne_s64_ss
71 ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
73 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
74 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
75 ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]]
76 ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
77 %0:sgpr(s64) = COPY $sgpr0_sgpr1
78 %1:sgpr(s64) = COPY $sgpr2_sgpr3
79 %2:sgpr(s32) = G_ICMP intpred(ne), %0, %1
80 S_ENDPGM 0, implicit %2
91 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
93 ; GFX8-LABEL: name: icmp_slt_s64_ss
94 ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
96 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
97 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
98 ; GFX8-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
99 ; GFX8-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
100 ; GFX6-LABEL: name: icmp_slt_s64_ss
101 ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
103 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
104 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
105 ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]]
106 ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
107 %0:sgpr(s64) = COPY $sgpr0_sgpr1
108 %1:sgpr(s64) = COPY $sgpr2_sgpr3
109 %2:sgpr(s32) = G_ICMP intpred(slt), %0, %1
110 S_ENDPGM 0, implicit %2
117 regBankSelected: true
121 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
123 ; GFX8-LABEL: name: icmp_eq_s64_vv
124 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
126 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
127 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
128 ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
129 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
130 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
131 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
132 ; GFX6-LABEL: name: icmp_eq_s64_vv
133 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
135 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
136 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
137 ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
138 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
139 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
140 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
141 %0:vgpr(s64) = COPY $vgpr0_vgpr1
142 %1:vgpr(s64) = COPY $vgpr2_vgpr3
143 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
144 %3:vgpr(s1) = COPY %2
145 %4:vgpr(s32) = G_ZEXT %3
146 S_ENDPGM 0, implicit %4
153 regBankSelected: true
157 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
159 ; GFX8-LABEL: name: icmp_ne_s64_vv
160 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
162 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
163 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
164 ; GFX8-NEXT: [[V_CMP_NE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_NE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
165 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_NE_U64_e64_]]
166 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
167 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
168 ; GFX6-LABEL: name: icmp_ne_s64_vv
169 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
171 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
172 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
173 ; GFX6-NEXT: [[V_CMP_NE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_NE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
174 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_NE_U64_e64_]]
175 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
176 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
177 %0:vgpr(s64) = COPY $vgpr0_vgpr1
178 %1:vgpr(s64) = COPY $vgpr2_vgpr3
179 %2:vcc(s1) = G_ICMP intpred(ne), %0, %1
180 %3:vgpr(s1) = COPY %2
181 %4:vgpr(s32) = G_ZEXT %3
182 S_ENDPGM 0, implicit %4
187 name: icmp_sgt_s64_vv
189 regBankSelected: true
193 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
195 ; GFX8-LABEL: name: icmp_sgt_s64_vv
196 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
198 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
199 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
200 ; GFX8-NEXT: [[V_CMP_GT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
201 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_I64_e64_]]
202 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
203 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
204 ; GFX6-LABEL: name: icmp_sgt_s64_vv
205 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
207 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
208 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
209 ; GFX6-NEXT: [[V_CMP_GT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
210 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_I64_e64_]]
211 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
212 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
213 %0:vgpr(s64) = COPY $vgpr0_vgpr1
214 %1:vgpr(s64) = COPY $vgpr2_vgpr3
215 %2:vcc(s1) = G_ICMP intpred(sgt), %0, %1
216 %3:vgpr(s1) = COPY %2
217 %4:vgpr(s32) = G_ZEXT %3
218 S_ENDPGM 0, implicit %4
223 name: icmp_sge_s64_vv
225 regBankSelected: true
229 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
231 ; GFX8-LABEL: name: icmp_sge_s64_vv
232 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
234 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
235 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
236 ; GFX8-NEXT: [[V_CMP_GE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
237 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_I64_e64_]]
238 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
239 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
240 ; GFX6-LABEL: name: icmp_sge_s64_vv
241 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
243 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
244 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
245 ; GFX6-NEXT: [[V_CMP_GE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
246 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_I64_e64_]]
247 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
248 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
249 %0:vgpr(s64) = COPY $vgpr0_vgpr1
250 %1:vgpr(s64) = COPY $vgpr2_vgpr3
251 %2:vcc(s1) = G_ICMP intpred(sge), %0, %1
252 %3:vgpr(s1) = COPY %2
253 %4:vgpr(s32) = G_ZEXT %3
254 S_ENDPGM 0, implicit %4
259 name: icmp_slt_s64_vv
261 regBankSelected: true
265 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
267 ; GFX8-LABEL: name: icmp_slt_s64_vv
268 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
270 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
271 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
272 ; GFX8-NEXT: [[V_CMP_LT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
273 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_I64_e64_]]
274 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
275 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
276 ; GFX6-LABEL: name: icmp_slt_s64_vv
277 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
279 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
280 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
281 ; GFX6-NEXT: [[V_CMP_LT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_I64_e64 [[COPY]], [[COPY1]], implicit $exec
282 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_I64_e64_]]
283 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
284 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
285 %0:vgpr(s64) = COPY $vgpr0_vgpr1
286 %1:vgpr(s64) = COPY $vgpr2_vgpr3
287 %2:vcc(s1) = G_ICMP intpred(slt), %0, %1
288 %3:vgpr(s1) = COPY %2
289 %4:vgpr(s32) = G_ZEXT %3
290 S_ENDPGM 0, implicit %4
295 name: icmp_sle_s64_vv
297 regBankSelected: true
301 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
303 ; GFX8-LABEL: name: icmp_sle_s64_vv
304 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
306 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
307 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
308 ; GFX8-NEXT: [[V_CMP_LE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
309 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_I64_e64_]]
310 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
311 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
312 ; GFX6-LABEL: name: icmp_sle_s64_vv
313 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
315 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
316 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
317 ; GFX6-NEXT: [[V_CMP_LE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_I64_e64 [[COPY]], [[COPY1]], implicit $exec
318 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_I64_e64_]]
319 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
320 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
321 %0:vgpr(s64) = COPY $vgpr0_vgpr1
322 %1:vgpr(s64) = COPY $vgpr2_vgpr3
323 %2:vcc(s1) = G_ICMP intpred(sle), %0, %1
324 %3:vgpr(s1) = COPY %2
325 %4:vgpr(s32) = G_ZEXT %3
326 S_ENDPGM 0, implicit %4
331 name: icmp_ugt_s64_vv
333 regBankSelected: true
337 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
339 ; GFX8-LABEL: name: icmp_ugt_s64_vv
340 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
342 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
343 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
344 ; GFX8-NEXT: [[V_CMP_GT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
345 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_U64_e64_]]
346 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
347 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
348 ; GFX6-LABEL: name: icmp_ugt_s64_vv
349 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
351 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
352 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
353 ; GFX6-NEXT: [[V_CMP_GT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
354 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_U64_e64_]]
355 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
356 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
357 %0:vgpr(s64) = COPY $vgpr0_vgpr1
358 %1:vgpr(s64) = COPY $vgpr2_vgpr3
359 %2:vcc(s1) = G_ICMP intpred(ugt), %0, %1
360 %3:vgpr(s1) = COPY %2
361 %4:vgpr(s32) = G_ZEXT %3
362 S_ENDPGM 0, implicit %4
367 name: icmp_uge_s64_vv
369 regBankSelected: true
373 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
375 ; GFX8-LABEL: name: icmp_uge_s64_vv
376 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
378 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
379 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
380 ; GFX8-NEXT: [[V_CMP_GE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
381 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_U64_e64_]]
382 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
383 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
384 ; GFX6-LABEL: name: icmp_uge_s64_vv
385 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
387 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
388 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
389 ; GFX6-NEXT: [[V_CMP_GE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
390 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_U64_e64_]]
391 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
392 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
393 %0:vgpr(s64) = COPY $vgpr0_vgpr1
394 %1:vgpr(s64) = COPY $vgpr2_vgpr3
395 %2:vcc(s1) = G_ICMP intpred(uge), %0, %1
396 %3:vgpr(s1) = COPY %2
397 %4:vgpr(s32) = G_ZEXT %3
398 S_ENDPGM 0, implicit %4
403 name: icmp_ult_s64_vv
405 regBankSelected: true
409 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
411 ; GFX8-LABEL: name: icmp_ult_s64_vv
412 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
414 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
415 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
416 ; GFX8-NEXT: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
417 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_U64_e64_]]
418 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
419 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
420 ; GFX6-LABEL: name: icmp_ult_s64_vv
421 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
423 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
424 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
425 ; GFX6-NEXT: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_U64_e64 [[COPY]], [[COPY1]], implicit $exec
426 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_U64_e64_]]
427 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
428 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
429 %0:vgpr(s64) = COPY $vgpr0_vgpr1
430 %1:vgpr(s64) = COPY $vgpr2_vgpr3
431 %2:vcc(s1) = G_ICMP intpred(ult), %0, %1
432 %3:vgpr(s1) = COPY %2
433 %4:vgpr(s32) = G_ZEXT %3
434 S_ENDPGM 0, implicit %4
439 name: icmp_ule_s64_vv
441 regBankSelected: true
445 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
447 ; GFX8-LABEL: name: icmp_ule_s64_vv
448 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
450 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
451 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
452 ; GFX8-NEXT: [[V_CMP_LE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
453 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_U64_e64_]]
454 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
455 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
456 ; GFX6-LABEL: name: icmp_ule_s64_vv
457 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
459 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
460 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
461 ; GFX6-NEXT: [[V_CMP_LE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_U64_e64 [[COPY]], [[COPY1]], implicit $exec
462 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_U64_e64_]]
463 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
464 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
465 %0:vgpr(s64) = COPY $vgpr0_vgpr1
466 %1:vgpr(s64) = COPY $vgpr2_vgpr3
467 %2:vcc(s1) = G_ICMP intpred(ule), %0, %1
468 %3:vgpr(s1) = COPY %2
469 %4:vgpr(s32) = G_ZEXT %3
470 S_ENDPGM 0, implicit %4
477 regBankSelected: true
481 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
483 ; GFX8-LABEL: name: icmp_eq_p0_ss
484 ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
486 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
487 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
488 ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
489 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
490 ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
491 ; GFX6-LABEL: name: icmp_eq_p0_ss
492 ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
494 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p0) = COPY $sgpr0_sgpr1
495 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(p0) = COPY $sgpr2_sgpr3
496 ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p0), [[COPY1]]
497 ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
498 %0:sgpr(p0) = COPY $sgpr0_sgpr1
499 %1:sgpr(p0) = COPY $sgpr2_sgpr3
500 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
501 S_ENDPGM 0, implicit %2
507 regBankSelected: true
511 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
513 ; GFX8-LABEL: name: icmp_eq_p1_ss
514 ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
516 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
517 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
518 ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
519 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
520 ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
521 ; GFX6-LABEL: name: icmp_eq_p1_ss
522 ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
524 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
525 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(p1) = COPY $sgpr2_sgpr3
526 ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p1), [[COPY1]]
527 ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
528 %0:sgpr(p1) = COPY $sgpr0_sgpr1
529 %1:sgpr(p1) = COPY $sgpr2_sgpr3
530 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
531 S_ENDPGM 0, implicit %2
536 name: icmp_eq_p999_ss
538 regBankSelected: true
542 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
544 ; GFX8-LABEL: name: icmp_eq_p999_ss
545 ; GFX8: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
547 ; GFX8-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
548 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
549 ; GFX8-NEXT: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc
550 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc
551 ; GFX8-NEXT: S_ENDPGM 0, implicit [[COPY2]]
552 ; GFX6-LABEL: name: icmp_eq_p999_ss
553 ; GFX6: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
555 ; GFX6-NEXT: [[COPY:%[0-9]+]]:sgpr(p999) = COPY $sgpr0_sgpr1
556 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:sgpr(p999) = COPY $sgpr2_sgpr3
557 ; GFX6-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p999), [[COPY1]]
558 ; GFX6-NEXT: S_ENDPGM 0, implicit [[ICMP]](s32)
559 %0:sgpr(p999) = COPY $sgpr0_sgpr1
560 %1:sgpr(p999) = COPY $sgpr2_sgpr3
561 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1
562 S_ENDPGM 0, implicit %2
569 regBankSelected: true
573 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
575 ; GFX8-LABEL: name: icmp_eq_p0_vv
576 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
578 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
579 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
580 ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
581 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
582 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
583 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
584 ; GFX6-LABEL: name: icmp_eq_p0_vv
585 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
587 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
588 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
589 ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
590 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
591 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
592 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
593 %0:vgpr(p0) = COPY $vgpr0_vgpr1
594 %1:vgpr(p0) = COPY $vgpr2_vgpr3
595 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
596 %3:vgpr(s1) = COPY %2
597 %4:vgpr(s32) = G_ZEXT %3
598 S_ENDPGM 0, implicit %4
605 regBankSelected: true
609 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
611 ; GFX8-LABEL: name: icmp_eq_p1_vv
612 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
614 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
615 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
616 ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
617 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
618 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
619 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
620 ; GFX6-LABEL: name: icmp_eq_p1_vv
621 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
623 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
624 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
625 ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
626 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
627 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
628 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
629 %0:vgpr(p1) = COPY $vgpr0_vgpr1
630 %1:vgpr(p1) = COPY $vgpr2_vgpr3
631 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
632 %3:vgpr(s1) = COPY %2
633 %4:vgpr(s32) = G_ZEXT %3
634 S_ENDPGM 0, implicit %4
639 name: icmp_eq_p999_vv
641 regBankSelected: true
645 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
647 ; GFX8-LABEL: name: icmp_eq_p999_vv
648 ; GFX8: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
650 ; GFX8-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
651 ; GFX8-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
652 ; GFX8-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
653 ; GFX8-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
654 ; GFX8-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
655 ; GFX8-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
656 ; GFX6-LABEL: name: icmp_eq_p999_vv
657 ; GFX6: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
659 ; GFX6-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
660 ; GFX6-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
661 ; GFX6-NEXT: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec
662 ; GFX6-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]]
663 ; GFX6-NEXT: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec
664 ; GFX6-NEXT: S_ENDPGM 0, implicit [[V_AND_B32_e32_]]
665 %0:vgpr(p999) = COPY $vgpr0_vgpr1
666 %1:vgpr(p999) = COPY $vgpr2_vgpr3
667 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1
668 %3:vgpr(s1) = COPY %2
669 %4:vgpr(s32) = G_ZEXT %3
670 S_ENDPGM 0, implicit %4