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 -global-isel-abort=0 -o - %s | FileCheck -check-prefix=WAVE64 %s
3 # RUN: llc -mtriple=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=WAVE32 %s
4 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=0 -o - %s | FileCheck -check-prefix=GFX11 %s
7 name: fcmp_false_s16_vv
13 liveins: $vgpr0, $vgpr1
14 ; WAVE64-LABEL: name: fcmp_false_s16_vv
15 ; WAVE64: liveins: $vgpr0, $vgpr1
17 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
18 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
19 ; WAVE64-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
20 ; WAVE64-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
21 ; WAVE64-NEXT: [[FCMP:%[0-9]+]]:vcc(s1) = G_FCMP floatpred(false), [[TRUNC]](s16), [[TRUNC1]]
22 ; WAVE64-NEXT: S_ENDPGM 0, implicit [[FCMP]](s1)
23 ; WAVE32-LABEL: name: fcmp_false_s16_vv
24 ; WAVE32: liveins: $vgpr0, $vgpr1
26 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
27 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
28 ; WAVE32-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
29 ; WAVE32-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
30 ; WAVE32-NEXT: [[FCMP:%[0-9]+]]:vcc(s1) = G_FCMP floatpred(false), [[TRUNC]](s16), [[TRUNC1]]
31 ; WAVE32-NEXT: S_ENDPGM 0, implicit [[FCMP]](s1)
32 ; GFX11-LABEL: name: fcmp_false_s16_vv
33 ; GFX11: liveins: $vgpr0, $vgpr1
35 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
36 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
37 ; GFX11-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
38 ; GFX11-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
39 ; GFX11-NEXT: [[FCMP:%[0-9]+]]:vcc(s1) = G_FCMP floatpred(false), [[TRUNC]](s16), [[TRUNC1]]
40 ; GFX11-NEXT: S_ENDPGM 0, implicit [[FCMP]](s1)
41 %0:vgpr(s32) = COPY $vgpr0
42 %1:vgpr(s32) = COPY $vgpr1
43 %2:vgpr(s16) = G_TRUNC %0
44 %3:vgpr(s16) = G_TRUNC %1
45 %4:vcc(s1) = G_FCMP floatpred(false), %2, %3
46 S_ENDPGM 0, implicit %4
56 liveins: $vgpr0, $vgpr1
57 ; WAVE64-LABEL: name: fcmp_oeq_s16_vv
58 ; WAVE64: liveins: $vgpr0, $vgpr1
60 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
61 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
62 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_EQ_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
63 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
64 ; WAVE32-LABEL: name: fcmp_oeq_s16_vv
65 ; WAVE32: liveins: $vgpr0, $vgpr1
67 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
68 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
69 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_EQ_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
70 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
71 ; GFX11-LABEL: name: fcmp_oeq_s16_vv
72 ; GFX11: liveins: $vgpr0, $vgpr1
74 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
75 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
76 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_EQ_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
77 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
78 %0:vgpr(s32) = COPY $vgpr0
79 %1:vgpr(s32) = COPY $vgpr1
80 %2:vgpr(s16) = G_TRUNC %0
81 %3:vgpr(s16) = G_TRUNC %1
82 %4:vcc(s1) = G_FCMP floatpred(oeq), %2, %3
83 S_ENDPGM 0, implicit %4
93 liveins: $vgpr0, $vgpr1
94 ; WAVE64-LABEL: name: fcmp_ogt_s16_vv
95 ; WAVE64: liveins: $vgpr0, $vgpr1
97 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
98 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
99 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_GT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
100 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
101 ; WAVE32-LABEL: name: fcmp_ogt_s16_vv
102 ; WAVE32: liveins: $vgpr0, $vgpr1
103 ; WAVE32-NEXT: {{ $}}
104 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
105 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
106 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_GT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
107 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
108 ; GFX11-LABEL: name: fcmp_ogt_s16_vv
109 ; GFX11: liveins: $vgpr0, $vgpr1
111 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
112 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
113 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_GT_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
114 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
115 %0:vgpr(s32) = COPY $vgpr0
116 %1:vgpr(s32) = COPY $vgpr1
117 %2:vgpr(s16) = G_TRUNC %0
118 %3:vgpr(s16) = G_TRUNC %1
119 %4:vcc(s1) = G_FCMP floatpred(ogt), %2, %3
120 S_ENDPGM 0, implicit %4
124 name: fcmp_oge_s16_vv
126 regBankSelected: true
130 liveins: $vgpr0, $vgpr1
131 ; WAVE64-LABEL: name: fcmp_oge_s16_vv
132 ; WAVE64: liveins: $vgpr0, $vgpr1
133 ; WAVE64-NEXT: {{ $}}
134 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
135 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
136 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_GE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
137 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
138 ; WAVE32-LABEL: name: fcmp_oge_s16_vv
139 ; WAVE32: liveins: $vgpr0, $vgpr1
140 ; WAVE32-NEXT: {{ $}}
141 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
142 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
143 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_GE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
144 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
145 ; GFX11-LABEL: name: fcmp_oge_s16_vv
146 ; GFX11: liveins: $vgpr0, $vgpr1
148 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
149 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
150 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_GE_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
151 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
152 %0:vgpr(s32) = COPY $vgpr0
153 %1:vgpr(s32) = COPY $vgpr1
154 %2:vgpr(s16) = G_TRUNC %0
155 %3:vgpr(s16) = G_TRUNC %1
156 %4:vcc(s1) = G_FCMP floatpred(oge), %2, %3
157 S_ENDPGM 0, implicit %4
161 name: fcmp_olt_s16_vv
163 regBankSelected: true
167 liveins: $vgpr0, $vgpr1
168 ; WAVE64-LABEL: name: fcmp_olt_s16_vv
169 ; WAVE64: liveins: $vgpr0, $vgpr1
170 ; WAVE64-NEXT: {{ $}}
171 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
172 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
173 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_LT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
174 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
175 ; WAVE32-LABEL: name: fcmp_olt_s16_vv
176 ; WAVE32: liveins: $vgpr0, $vgpr1
177 ; WAVE32-NEXT: {{ $}}
178 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
179 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
180 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
181 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
182 ; GFX11-LABEL: name: fcmp_olt_s16_vv
183 ; GFX11: liveins: $vgpr0, $vgpr1
185 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
186 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
187 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LT_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
188 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
189 %0:vgpr(s32) = COPY $vgpr0
190 %1:vgpr(s32) = COPY $vgpr1
191 %2:vgpr(s16) = G_TRUNC %0
192 %3:vgpr(s16) = G_TRUNC %1
193 %4:vcc(s1) = G_FCMP floatpred(olt), %2, %3
194 S_ENDPGM 0, implicit %4
198 name: fcmp_ole_s16_vv
200 regBankSelected: true
204 liveins: $vgpr0, $vgpr1
205 ; WAVE64-LABEL: name: fcmp_ole_s16_vv
206 ; WAVE64: liveins: $vgpr0, $vgpr1
207 ; WAVE64-NEXT: {{ $}}
208 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
209 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
210 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_LE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
211 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
212 ; WAVE32-LABEL: name: fcmp_ole_s16_vv
213 ; WAVE32: liveins: $vgpr0, $vgpr1
214 ; WAVE32-NEXT: {{ $}}
215 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
216 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
217 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
218 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
219 ; GFX11-LABEL: name: fcmp_ole_s16_vv
220 ; GFX11: liveins: $vgpr0, $vgpr1
222 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
223 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
224 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LE_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
225 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
226 %0:vgpr(s32) = COPY $vgpr0
227 %1:vgpr(s32) = COPY $vgpr1
228 %2:vgpr(s16) = G_TRUNC %0
229 %3:vgpr(s16) = G_TRUNC %1
230 %4:vcc(s1) = G_FCMP floatpred(ole), %2, %3
231 S_ENDPGM 0, implicit %4
234 name: fcmp_one_s16_vv
236 regBankSelected: true
240 liveins: $vgpr0, $vgpr1
241 ; WAVE64-LABEL: name: fcmp_one_s16_vv
242 ; WAVE64: liveins: $vgpr0, $vgpr1
243 ; WAVE64-NEXT: {{ $}}
244 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
245 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
246 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_LG_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
247 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
248 ; WAVE32-LABEL: name: fcmp_one_s16_vv
249 ; WAVE32: liveins: $vgpr0, $vgpr1
250 ; WAVE32-NEXT: {{ $}}
251 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
252 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
253 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LG_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
254 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
255 ; GFX11-LABEL: name: fcmp_one_s16_vv
256 ; GFX11: liveins: $vgpr0, $vgpr1
258 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
259 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
260 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LG_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
261 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
262 %0:vgpr(s32) = COPY $vgpr0
263 %1:vgpr(s32) = COPY $vgpr1
264 %2:vgpr(s16) = G_TRUNC %0
265 %3:vgpr(s16) = G_TRUNC %1
266 %4:vcc(s1) = G_FCMP floatpred(one), %2, %3
267 S_ENDPGM 0, implicit %4
271 name: fcmp_ord_s16_vv
273 regBankSelected: true
277 liveins: $vgpr0, $vgpr1
278 ; WAVE64-LABEL: name: fcmp_ord_s16_vv
279 ; WAVE64: liveins: $vgpr0, $vgpr1
280 ; WAVE64-NEXT: {{ $}}
281 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
282 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
283 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_LG_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
284 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
285 ; WAVE32-LABEL: name: fcmp_ord_s16_vv
286 ; WAVE32: liveins: $vgpr0, $vgpr1
287 ; WAVE32-NEXT: {{ $}}
288 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
289 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
290 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LG_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
291 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
292 ; GFX11-LABEL: name: fcmp_ord_s16_vv
293 ; GFX11: liveins: $vgpr0, $vgpr1
295 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
296 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
297 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_LG_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
298 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
299 %0:vgpr(s32) = COPY $vgpr0
300 %1:vgpr(s32) = COPY $vgpr1
301 %2:vgpr(s16) = G_TRUNC %0
302 %3:vgpr(s16) = G_TRUNC %1
303 %4:vcc(s1) = G_FCMP floatpred(one), %2, %3
304 S_ENDPGM 0, implicit %4
308 name: fcmp_uno_s16_vv
310 regBankSelected: true
314 liveins: $vgpr0, $vgpr1
315 ; WAVE64-LABEL: name: fcmp_uno_s16_vv
316 ; WAVE64: liveins: $vgpr0, $vgpr1
317 ; WAVE64-NEXT: {{ $}}
318 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
319 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
320 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_U_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
321 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
322 ; WAVE32-LABEL: name: fcmp_uno_s16_vv
323 ; WAVE32: liveins: $vgpr0, $vgpr1
324 ; WAVE32-NEXT: {{ $}}
325 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
326 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
327 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_U_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
328 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
329 ; GFX11-LABEL: name: fcmp_uno_s16_vv
330 ; GFX11: liveins: $vgpr0, $vgpr1
332 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
333 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
334 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_U_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
335 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
336 %0:vgpr(s32) = COPY $vgpr0
337 %1:vgpr(s32) = COPY $vgpr1
338 %2:vgpr(s16) = G_TRUNC %0
339 %3:vgpr(s16) = G_TRUNC %1
340 %4:vcc(s1) = G_FCMP floatpred(uno), %2, %3
341 S_ENDPGM 0, implicit %4
345 name: fcmp_ueq_s16_vv
347 regBankSelected: true
351 liveins: $vgpr0, $vgpr1
352 ; WAVE64-LABEL: name: fcmp_ueq_s16_vv
353 ; WAVE64: liveins: $vgpr0, $vgpr1
354 ; WAVE64-NEXT: {{ $}}
355 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
356 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
357 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_NLG_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
358 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
359 ; WAVE32-LABEL: name: fcmp_ueq_s16_vv
360 ; WAVE32: liveins: $vgpr0, $vgpr1
361 ; WAVE32-NEXT: {{ $}}
362 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
363 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
364 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NLG_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
365 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
366 ; GFX11-LABEL: name: fcmp_ueq_s16_vv
367 ; GFX11: liveins: $vgpr0, $vgpr1
369 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
370 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
371 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NLG_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
372 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
373 %0:vgpr(s32) = COPY $vgpr0
374 %1:vgpr(s32) = COPY $vgpr1
375 %2:vgpr(s16) = G_TRUNC %0
376 %3:vgpr(s16) = G_TRUNC %1
377 %4:vcc(s1) = G_FCMP floatpred(ueq), %2, %3
378 S_ENDPGM 0, implicit %4
382 name: fcmp_ugt_s16_vv
384 regBankSelected: true
388 liveins: $vgpr0, $vgpr1
389 ; WAVE64-LABEL: name: fcmp_ugt_s16_vv
390 ; WAVE64: liveins: $vgpr0, $vgpr1
391 ; WAVE64-NEXT: {{ $}}
392 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
393 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
394 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_NLE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
395 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
396 ; WAVE32-LABEL: name: fcmp_ugt_s16_vv
397 ; WAVE32: liveins: $vgpr0, $vgpr1
398 ; WAVE32-NEXT: {{ $}}
399 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
400 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
401 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NLE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
402 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
403 ; GFX11-LABEL: name: fcmp_ugt_s16_vv
404 ; GFX11: liveins: $vgpr0, $vgpr1
406 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
407 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
408 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NLE_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
409 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
410 %0:vgpr(s32) = COPY $vgpr0
411 %1:vgpr(s32) = COPY $vgpr1
412 %2:vgpr(s16) = G_TRUNC %0
413 %3:vgpr(s16) = G_TRUNC %1
414 %4:vcc(s1) = G_FCMP floatpred(ugt), %2, %3
415 S_ENDPGM 0, implicit %4
419 name: fcmp_uge_s16_vv
421 regBankSelected: true
425 liveins: $vgpr0, $vgpr1
426 ; WAVE64-LABEL: name: fcmp_uge_s16_vv
427 ; WAVE64: liveins: $vgpr0, $vgpr1
428 ; WAVE64-NEXT: {{ $}}
429 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
430 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
431 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_NLT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
432 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
433 ; WAVE32-LABEL: name: fcmp_uge_s16_vv
434 ; WAVE32: liveins: $vgpr0, $vgpr1
435 ; WAVE32-NEXT: {{ $}}
436 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
437 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
438 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NLT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
439 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
440 ; GFX11-LABEL: name: fcmp_uge_s16_vv
441 ; GFX11: liveins: $vgpr0, $vgpr1
443 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
444 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
445 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NLT_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
446 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
447 %0:vgpr(s32) = COPY $vgpr0
448 %1:vgpr(s32) = COPY $vgpr1
449 %2:vgpr(s16) = G_TRUNC %0
450 %3:vgpr(s16) = G_TRUNC %1
451 %4:vcc(s1) = G_FCMP floatpred(uge), %2, %3
452 S_ENDPGM 0, implicit %4
456 name: fcmp_ult_s16_vv
458 regBankSelected: true
462 liveins: $vgpr0, $vgpr1
463 ; WAVE64-LABEL: name: fcmp_ult_s16_vv
464 ; WAVE64: liveins: $vgpr0, $vgpr1
465 ; WAVE64-NEXT: {{ $}}
466 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
467 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
468 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_NGE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
469 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
470 ; WAVE32-LABEL: name: fcmp_ult_s16_vv
471 ; WAVE32: liveins: $vgpr0, $vgpr1
472 ; WAVE32-NEXT: {{ $}}
473 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
474 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
475 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NGE_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
476 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
477 ; GFX11-LABEL: name: fcmp_ult_s16_vv
478 ; GFX11: liveins: $vgpr0, $vgpr1
480 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
481 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
482 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NGE_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
483 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
484 %0:vgpr(s32) = COPY $vgpr0
485 %1:vgpr(s32) = COPY $vgpr1
486 %2:vgpr(s16) = G_TRUNC %0
487 %3:vgpr(s16) = G_TRUNC %1
488 %4:vcc(s1) = G_FCMP floatpred(ult), %2, %3
489 S_ENDPGM 0, implicit %4
493 name: fcmp_ule_s16_vv
495 regBankSelected: true
499 liveins: $vgpr0, $vgpr1
500 ; WAVE64-LABEL: name: fcmp_ule_s16_vv
501 ; WAVE64: liveins: $vgpr0, $vgpr1
502 ; WAVE64-NEXT: {{ $}}
503 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
504 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
505 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_NGT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
506 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
507 ; WAVE32-LABEL: name: fcmp_ule_s16_vv
508 ; WAVE32: liveins: $vgpr0, $vgpr1
509 ; WAVE32-NEXT: {{ $}}
510 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
511 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
512 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NGT_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
513 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
514 ; GFX11-LABEL: name: fcmp_ule_s16_vv
515 ; GFX11: liveins: $vgpr0, $vgpr1
517 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
518 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
519 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NGT_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
520 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
521 %0:vgpr(s32) = COPY $vgpr0
522 %1:vgpr(s32) = COPY $vgpr1
523 %2:vgpr(s16) = G_TRUNC %0
524 %3:vgpr(s16) = G_TRUNC %1
525 %4:vcc(s1) = G_FCMP floatpred(ule), %2, %3
526 S_ENDPGM 0, implicit %4
530 name: fcmp_une_s16_vv
532 regBankSelected: true
536 liveins: $vgpr0, $vgpr1
537 ; WAVE64-LABEL: name: fcmp_une_s16_vv
538 ; WAVE64: liveins: $vgpr0, $vgpr1
539 ; WAVE64-NEXT: {{ $}}
540 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
541 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
542 ; WAVE64-NEXT: %4:sreg_64_xexec = nofpexcept V_CMP_NEQ_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
543 ; WAVE64-NEXT: S_ENDPGM 0, implicit %4
544 ; WAVE32-LABEL: name: fcmp_une_s16_vv
545 ; WAVE32: liveins: $vgpr0, $vgpr1
546 ; WAVE32-NEXT: {{ $}}
547 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
548 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
549 ; WAVE32-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NEQ_F16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
550 ; WAVE32-NEXT: S_ENDPGM 0, implicit %4
551 ; GFX11-LABEL: name: fcmp_une_s16_vv
552 ; GFX11: liveins: $vgpr0, $vgpr1
554 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
555 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
556 ; GFX11-NEXT: %4:sreg_32_xm0_xexec = nofpexcept V_CMP_NEQ_F16_t16_e64 0, [[COPY]], 0, [[COPY1]], 0, implicit $mode, implicit $exec
557 ; GFX11-NEXT: S_ENDPGM 0, implicit %4
558 %0:vgpr(s32) = COPY $vgpr0
559 %1:vgpr(s32) = COPY $vgpr1
560 %2:vgpr(s16) = G_TRUNC %0
561 %3:vgpr(s16) = G_TRUNC %1
562 %4:vcc(s1) = G_FCMP floatpred(une), %2, %3
563 S_ENDPGM 0, implicit %4
567 name: fcmp_true_s16_vv
569 regBankSelected: true
573 liveins: $vgpr0, $vgpr1
574 ; WAVE64-LABEL: name: fcmp_true_s16_vv
575 ; WAVE64: liveins: $vgpr0, $vgpr1
576 ; WAVE64-NEXT: {{ $}}
577 ; WAVE64-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
578 ; WAVE64-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
579 ; WAVE64-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
580 ; WAVE64-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
581 ; WAVE64-NEXT: [[FCMP:%[0-9]+]]:vcc(s1) = G_FCMP floatpred(true), [[TRUNC]](s16), [[TRUNC1]]
582 ; WAVE64-NEXT: S_ENDPGM 0, implicit [[FCMP]](s1)
583 ; WAVE32-LABEL: name: fcmp_true_s16_vv
584 ; WAVE32: liveins: $vgpr0, $vgpr1
585 ; WAVE32-NEXT: {{ $}}
586 ; WAVE32-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
587 ; WAVE32-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
588 ; WAVE32-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
589 ; WAVE32-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
590 ; WAVE32-NEXT: [[FCMP:%[0-9]+]]:vcc(s1) = G_FCMP floatpred(true), [[TRUNC]](s16), [[TRUNC1]]
591 ; WAVE32-NEXT: S_ENDPGM 0, implicit [[FCMP]](s1)
592 ; GFX11-LABEL: name: fcmp_true_s16_vv
593 ; GFX11: liveins: $vgpr0, $vgpr1
595 ; GFX11-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
596 ; GFX11-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
597 ; GFX11-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
598 ; GFX11-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
599 ; GFX11-NEXT: [[FCMP:%[0-9]+]]:vcc(s1) = G_FCMP floatpred(true), [[TRUNC]](s16), [[TRUNC1]]
600 ; GFX11-NEXT: S_ENDPGM 0, implicit [[FCMP]](s1)
601 %0:vgpr(s32) = COPY $vgpr0
602 %1:vgpr(s32) = COPY $vgpr1
603 %2:vgpr(s16) = G_TRUNC %0
604 %3:vgpr(s16) = G_TRUNC %1
605 %4:vcc(s1) = G_FCMP floatpred(true), %2, %3
606 S_ENDPGM 0, implicit %4