1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
3 # RUN: llc -mtriple=i386-linux-gnu -mattr=+sse2 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
5 # TODO: x87/SSE1-only test coverage
9 define i1 @fcmp_float_oeq(float %x, float %y) {
10 %1 = fcmp oeq float %x, %y
14 define i1 @fcmp_float_ogt(float %x, float %y) {
15 %1 = fcmp ogt float %x, %y
19 define i1 @fcmp_float_oge(float %x, float %y) {
20 %1 = fcmp oge float %x, %y
24 define i1 @fcmp_float_olt(float %x, float %y) {
25 %1 = fcmp olt float %x, %y
29 define i1 @fcmp_float_ole(float %x, float %y) {
30 %1 = fcmp ole float %x, %y
34 define i1 @fcmp_float_one(float %x, float %y) {
35 %1 = fcmp one float %x, %y
39 define i1 @fcmp_float_ord(float %x, float %y) {
40 %1 = fcmp ord float %x, %y
44 define i1 @fcmp_float_uno(float %x, float %y) {
45 %1 = fcmp uno float %x, %y
49 define i1 @fcmp_float_ueq(float %x, float %y) {
50 %1 = fcmp ueq float %x, %y
54 define i1 @fcmp_float_ugt(float %x, float %y) {
55 %1 = fcmp ugt float %x, %y
59 define i1 @fcmp_float_uge(float %x, float %y) {
60 %1 = fcmp uge float %x, %y
64 define i1 @fcmp_float_ult(float %x, float %y) {
65 %1 = fcmp ult float %x, %y
69 define i1 @fcmp_float_ule(float %x, float %y) {
70 %1 = fcmp ule float %x, %y
74 define i1 @fcmp_float_une(float %x, float %y) {
75 %1 = fcmp une float %x, %y
79 define i1 @fcmp_double_oeq(double %x, double %y) {
80 %1 = fcmp oeq double %x, %y
84 define i1 @fcmp_double_ogt(double %x, double %y) {
85 %1 = fcmp ogt double %x, %y
89 define i1 @fcmp_double_oge(double %x, double %y) {
90 %1 = fcmp oge double %x, %y
94 define i1 @fcmp_double_olt(double %x, double %y) {
95 %1 = fcmp olt double %x, %y
99 define i1 @fcmp_double_ole(double %x, double %y) {
100 %1 = fcmp ole double %x, %y
104 define i1 @fcmp_double_one(double %x, double %y) {
105 %1 = fcmp one double %x, %y
109 define i1 @fcmp_double_ord(double %x, double %y) {
110 %1 = fcmp ord double %x, %y
114 define i1 @fcmp_double_uno(double %x, double %y) {
115 %1 = fcmp uno double %x, %y
119 define i1 @fcmp_double_ueq(double %x, double %y) {
120 %1 = fcmp ueq double %x, %y
124 define i1 @fcmp_double_ugt(double %x, double %y) {
125 %1 = fcmp ugt double %x, %y
129 define i1 @fcmp_double_uge(double %x, double %y) {
130 %1 = fcmp uge double %x, %y
134 define i1 @fcmp_double_ult(double %x, double %y) {
135 %1 = fcmp ult double %x, %y
139 define i1 @fcmp_double_ule(double %x, double %y) {
140 %1 = fcmp ule double %x, %y
144 define i1 @fcmp_double_une(double %x, double %y) {
145 %1 = fcmp une double %x, %y
153 tracksRegLiveness: true
155 - { id: 0, class: _ }
156 - { id: 1, class: _ }
157 - { id: 2, class: _ }
158 - { id: 3, class: _ }
159 - { id: 4, class: _ }
160 - { id: 5, class: _ }
163 liveins: $xmm0, $xmm1
165 ; CHECK-LABEL: name: fcmp_float_oeq
166 ; CHECK: liveins: $xmm0, $xmm1
168 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
169 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
170 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
171 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
172 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s32), [[TRUNC1]]
173 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
174 ; CHECK-NEXT: RET 0, implicit $al
175 %2:_(s128) = COPY $xmm0
176 %0:_(s32) = G_TRUNC %2(s128)
177 %3:_(s128) = COPY $xmm1
178 %1:_(s32) = G_TRUNC %3(s128)
179 %4:_(s1) = G_FCMP floatpred(oeq), %0(s32), %1
180 %5:_(s8) = G_ANYEXT %4(s1)
188 tracksRegLiveness: true
190 - { id: 0, class: _ }
191 - { id: 1, class: _ }
192 - { id: 2, class: _ }
193 - { id: 3, class: _ }
194 - { id: 4, class: _ }
195 - { id: 5, class: _ }
198 liveins: $xmm0, $xmm1
200 ; CHECK-LABEL: name: fcmp_float_ogt
201 ; CHECK: liveins: $xmm0, $xmm1
203 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
204 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
205 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
206 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
207 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s32), [[TRUNC1]]
208 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
209 ; CHECK-NEXT: RET 0, implicit $al
210 %2:_(s128) = COPY $xmm0
211 %0:_(s32) = G_TRUNC %2(s128)
212 %3:_(s128) = COPY $xmm1
213 %1:_(s32) = G_TRUNC %3(s128)
214 %4:_(s1) = G_FCMP floatpred(ogt), %0(s32), %1
215 %5:_(s8) = G_ANYEXT %4(s1)
223 tracksRegLiveness: true
225 - { id: 0, class: _ }
226 - { id: 1, class: _ }
227 - { id: 2, class: _ }
228 - { id: 3, class: _ }
229 - { id: 4, class: _ }
230 - { id: 5, class: _ }
233 liveins: $xmm0, $xmm1
235 ; CHECK-LABEL: name: fcmp_float_oge
236 ; CHECK: liveins: $xmm0, $xmm1
238 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
239 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
240 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
241 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
242 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oge), [[TRUNC]](s32), [[TRUNC1]]
243 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
244 ; CHECK-NEXT: RET 0, implicit $al
245 %2:_(s128) = COPY $xmm0
246 %0:_(s32) = G_TRUNC %2(s128)
247 %3:_(s128) = COPY $xmm1
248 %1:_(s32) = G_TRUNC %3(s128)
249 %4:_(s1) = G_FCMP floatpred(oge), %0(s32), %1
250 %5:_(s8) = G_ANYEXT %4(s1)
258 tracksRegLiveness: true
260 - { id: 0, class: _ }
261 - { id: 1, class: _ }
262 - { id: 2, class: _ }
263 - { id: 3, class: _ }
264 - { id: 4, class: _ }
265 - { id: 5, class: _ }
268 liveins: $xmm0, $xmm1
270 ; CHECK-LABEL: name: fcmp_float_olt
271 ; CHECK: liveins: $xmm0, $xmm1
273 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
274 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
275 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
276 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
277 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(olt), [[TRUNC]](s32), [[TRUNC1]]
278 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
279 ; CHECK-NEXT: RET 0, implicit $al
280 %2:_(s128) = COPY $xmm0
281 %0:_(s32) = G_TRUNC %2(s128)
282 %3:_(s128) = COPY $xmm1
283 %1:_(s32) = G_TRUNC %3(s128)
284 %4:_(s1) = G_FCMP floatpred(olt), %0(s32), %1
285 %5:_(s8) = G_ANYEXT %4(s1)
293 tracksRegLiveness: true
295 - { id: 0, class: _ }
296 - { id: 1, class: _ }
297 - { id: 2, class: _ }
298 - { id: 3, class: _ }
299 - { id: 4, class: _ }
300 - { id: 5, class: _ }
303 liveins: $xmm0, $xmm1
305 ; CHECK-LABEL: name: fcmp_float_ole
306 ; CHECK: liveins: $xmm0, $xmm1
308 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
309 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
310 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
311 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
312 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ole), [[TRUNC]](s32), [[TRUNC1]]
313 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
314 ; CHECK-NEXT: RET 0, implicit $al
315 %2:_(s128) = COPY $xmm0
316 %0:_(s32) = G_TRUNC %2(s128)
317 %3:_(s128) = COPY $xmm1
318 %1:_(s32) = G_TRUNC %3(s128)
319 %4:_(s1) = G_FCMP floatpred(ole), %0(s32), %1
320 %5:_(s8) = G_ANYEXT %4(s1)
328 tracksRegLiveness: true
330 - { id: 0, class: _ }
331 - { id: 1, class: _ }
332 - { id: 2, class: _ }
333 - { id: 3, class: _ }
334 - { id: 4, class: _ }
335 - { id: 5, class: _ }
338 liveins: $xmm0, $xmm1
340 ; CHECK-LABEL: name: fcmp_float_one
341 ; CHECK: liveins: $xmm0, $xmm1
343 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
344 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
345 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
346 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
347 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(one), [[TRUNC]](s32), [[TRUNC1]]
348 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
349 ; CHECK-NEXT: RET 0, implicit $al
350 %2:_(s128) = COPY $xmm0
351 %0:_(s32) = G_TRUNC %2(s128)
352 %3:_(s128) = COPY $xmm1
353 %1:_(s32) = G_TRUNC %3(s128)
354 %4:_(s1) = G_FCMP floatpred(one), %0(s32), %1
355 %5:_(s8) = G_ANYEXT %4(s1)
363 tracksRegLiveness: true
365 - { id: 0, class: _ }
366 - { id: 1, class: _ }
367 - { id: 2, class: _ }
368 - { id: 3, class: _ }
369 - { id: 4, class: _ }
370 - { id: 5, class: _ }
373 liveins: $xmm0, $xmm1
375 ; CHECK-LABEL: name: fcmp_float_ord
376 ; CHECK: liveins: $xmm0, $xmm1
378 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
379 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
380 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
381 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
382 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ord), [[TRUNC]](s32), [[TRUNC1]]
383 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
384 ; CHECK-NEXT: RET 0, implicit $al
385 %2:_(s128) = COPY $xmm0
386 %0:_(s32) = G_TRUNC %2(s128)
387 %3:_(s128) = COPY $xmm1
388 %1:_(s32) = G_TRUNC %3(s128)
389 %4:_(s1) = G_FCMP floatpred(ord), %0(s32), %1
390 %5:_(s8) = G_ANYEXT %4(s1)
398 tracksRegLiveness: true
400 - { id: 0, class: _ }
401 - { id: 1, class: _ }
402 - { id: 2, class: _ }
403 - { id: 3, class: _ }
404 - { id: 4, class: _ }
405 - { id: 5, class: _ }
408 liveins: $xmm0, $xmm1
410 ; CHECK-LABEL: name: fcmp_float_uno
411 ; CHECK: liveins: $xmm0, $xmm1
413 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
414 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
415 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
416 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
417 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uno), [[TRUNC]](s32), [[TRUNC1]]
418 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
419 ; CHECK-NEXT: RET 0, implicit $al
420 %2:_(s128) = COPY $xmm0
421 %0:_(s32) = G_TRUNC %2(s128)
422 %3:_(s128) = COPY $xmm1
423 %1:_(s32) = G_TRUNC %3(s128)
424 %4:_(s1) = G_FCMP floatpred(uno), %0(s32), %1
425 %5:_(s8) = G_ANYEXT %4(s1)
433 tracksRegLiveness: true
435 - { id: 0, class: _ }
436 - { id: 1, class: _ }
437 - { id: 2, class: _ }
438 - { id: 3, class: _ }
439 - { id: 4, class: _ }
440 - { id: 5, class: _ }
443 liveins: $xmm0, $xmm1
445 ; CHECK-LABEL: name: fcmp_float_ueq
446 ; CHECK: liveins: $xmm0, $xmm1
448 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
449 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
450 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
451 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
452 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s32), [[TRUNC1]]
453 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
454 ; CHECK-NEXT: RET 0, implicit $al
455 %2:_(s128) = COPY $xmm0
456 %0:_(s32) = G_TRUNC %2(s128)
457 %3:_(s128) = COPY $xmm1
458 %1:_(s32) = G_TRUNC %3(s128)
459 %4:_(s1) = G_FCMP floatpred(ueq), %0(s32), %1
460 %5:_(s8) = G_ANYEXT %4(s1)
468 tracksRegLiveness: true
470 - { id: 0, class: _ }
471 - { id: 1, class: _ }
472 - { id: 2, class: _ }
473 - { id: 3, class: _ }
474 - { id: 4, class: _ }
475 - { id: 5, class: _ }
478 liveins: $xmm0, $xmm1
480 ; CHECK-LABEL: name: fcmp_float_ugt
481 ; CHECK: liveins: $xmm0, $xmm1
483 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
484 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
485 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
486 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
487 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s32), [[TRUNC1]]
488 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
489 ; CHECK-NEXT: RET 0, implicit $al
490 %2:_(s128) = COPY $xmm0
491 %0:_(s32) = G_TRUNC %2(s128)
492 %3:_(s128) = COPY $xmm1
493 %1:_(s32) = G_TRUNC %3(s128)
494 %4:_(s1) = G_FCMP floatpred(ugt), %0(s32), %1
495 %5:_(s8) = G_ANYEXT %4(s1)
503 tracksRegLiveness: true
505 - { id: 0, class: _ }
506 - { id: 1, class: _ }
507 - { id: 2, class: _ }
508 - { id: 3, class: _ }
509 - { id: 4, class: _ }
510 - { id: 5, class: _ }
513 liveins: $xmm0, $xmm1
515 ; CHECK-LABEL: name: fcmp_float_uge
516 ; CHECK: liveins: $xmm0, $xmm1
518 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
519 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
520 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
521 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
522 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uge), [[TRUNC]](s32), [[TRUNC1]]
523 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
524 ; CHECK-NEXT: RET 0, implicit $al
525 %2:_(s128) = COPY $xmm0
526 %0:_(s32) = G_TRUNC %2(s128)
527 %3:_(s128) = COPY $xmm1
528 %1:_(s32) = G_TRUNC %3(s128)
529 %4:_(s1) = G_FCMP floatpred(uge), %0(s32), %1
530 %5:_(s8) = G_ANYEXT %4(s1)
538 tracksRegLiveness: true
540 - { id: 0, class: _ }
541 - { id: 1, class: _ }
542 - { id: 2, class: _ }
543 - { id: 3, class: _ }
544 - { id: 4, class: _ }
545 - { id: 5, class: _ }
548 liveins: $xmm0, $xmm1
550 ; CHECK-LABEL: name: fcmp_float_ult
551 ; CHECK: liveins: $xmm0, $xmm1
553 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
554 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
555 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
556 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
557 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ult), [[TRUNC]](s32), [[TRUNC1]]
558 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
559 ; CHECK-NEXT: RET 0, implicit $al
560 %2:_(s128) = COPY $xmm0
561 %0:_(s32) = G_TRUNC %2(s128)
562 %3:_(s128) = COPY $xmm1
563 %1:_(s32) = G_TRUNC %3(s128)
564 %4:_(s1) = G_FCMP floatpred(ult), %0(s32), %1
565 %5:_(s8) = G_ANYEXT %4(s1)
573 tracksRegLiveness: true
575 - { id: 0, class: _ }
576 - { id: 1, class: _ }
577 - { id: 2, class: _ }
578 - { id: 3, class: _ }
579 - { id: 4, class: _ }
580 - { id: 5, class: _ }
583 liveins: $xmm0, $xmm1
585 ; CHECK-LABEL: name: fcmp_float_ule
586 ; CHECK: liveins: $xmm0, $xmm1
588 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
589 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
590 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
591 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
592 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ule), [[TRUNC]](s32), [[TRUNC1]]
593 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
594 ; CHECK-NEXT: RET 0, implicit $al
595 %2:_(s128) = COPY $xmm0
596 %0:_(s32) = G_TRUNC %2(s128)
597 %3:_(s128) = COPY $xmm1
598 %1:_(s32) = G_TRUNC %3(s128)
599 %4:_(s1) = G_FCMP floatpred(ule), %0(s32), %1
600 %5:_(s8) = G_ANYEXT %4(s1)
608 tracksRegLiveness: true
610 - { id: 0, class: _ }
611 - { id: 1, class: _ }
612 - { id: 2, class: _ }
613 - { id: 3, class: _ }
614 - { id: 4, class: _ }
615 - { id: 5, class: _ }
618 liveins: $xmm0, $xmm1
620 ; CHECK-LABEL: name: fcmp_float_une
621 ; CHECK: liveins: $xmm0, $xmm1
623 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
624 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
625 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
626 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
627 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(une), [[TRUNC]](s32), [[TRUNC1]]
628 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
629 ; CHECK-NEXT: RET 0, implicit $al
630 %2:_(s128) = COPY $xmm0
631 %0:_(s32) = G_TRUNC %2(s128)
632 %3:_(s128) = COPY $xmm1
633 %1:_(s32) = G_TRUNC %3(s128)
634 %4:_(s1) = G_FCMP floatpred(une), %0(s32), %1
635 %5:_(s8) = G_ANYEXT %4(s1)
641 name: fcmp_double_oeq
643 tracksRegLiveness: true
645 - { id: 0, class: _ }
646 - { id: 1, class: _ }
647 - { id: 2, class: _ }
648 - { id: 3, class: _ }
649 - { id: 4, class: _ }
650 - { id: 5, class: _ }
653 liveins: $xmm0, $xmm1
655 ; CHECK-LABEL: name: fcmp_double_oeq
656 ; CHECK: liveins: $xmm0, $xmm1
658 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
659 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
660 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
661 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
662 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oeq), [[TRUNC]](s64), [[TRUNC1]]
663 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
664 ; CHECK-NEXT: RET 0, implicit $al
665 %2:_(s128) = COPY $xmm0
666 %0:_(s64) = G_TRUNC %2(s128)
667 %3:_(s128) = COPY $xmm1
668 %1:_(s64) = G_TRUNC %3(s128)
669 %4:_(s1) = G_FCMP floatpred(oeq), %0(s64), %1
670 %5:_(s8) = G_ANYEXT %4(s1)
676 name: fcmp_double_ogt
678 tracksRegLiveness: true
680 - { id: 0, class: _ }
681 - { id: 1, class: _ }
682 - { id: 2, class: _ }
683 - { id: 3, class: _ }
684 - { id: 4, class: _ }
685 - { id: 5, class: _ }
688 liveins: $xmm0, $xmm1
690 ; CHECK-LABEL: name: fcmp_double_ogt
691 ; CHECK: liveins: $xmm0, $xmm1
693 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
694 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
695 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
696 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
697 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ogt), [[TRUNC]](s64), [[TRUNC1]]
698 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
699 ; CHECK-NEXT: RET 0, implicit $al
700 %2:_(s128) = COPY $xmm0
701 %0:_(s64) = G_TRUNC %2(s128)
702 %3:_(s128) = COPY $xmm1
703 %1:_(s64) = G_TRUNC %3(s128)
704 %4:_(s1) = G_FCMP floatpred(ogt), %0(s64), %1
705 %5:_(s8) = G_ANYEXT %4(s1)
711 name: fcmp_double_oge
713 tracksRegLiveness: true
715 - { id: 0, class: _ }
716 - { id: 1, class: _ }
717 - { id: 2, class: _ }
718 - { id: 3, class: _ }
719 - { id: 4, class: _ }
720 - { id: 5, class: _ }
723 liveins: $xmm0, $xmm1
725 ; CHECK-LABEL: name: fcmp_double_oge
726 ; CHECK: liveins: $xmm0, $xmm1
728 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
729 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
730 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
731 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
732 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(oge), [[TRUNC]](s64), [[TRUNC1]]
733 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
734 ; CHECK-NEXT: RET 0, implicit $al
735 %2:_(s128) = COPY $xmm0
736 %0:_(s64) = G_TRUNC %2(s128)
737 %3:_(s128) = COPY $xmm1
738 %1:_(s64) = G_TRUNC %3(s128)
739 %4:_(s1) = G_FCMP floatpred(oge), %0(s64), %1
740 %5:_(s8) = G_ANYEXT %4(s1)
746 name: fcmp_double_olt
748 tracksRegLiveness: true
750 - { id: 0, class: _ }
751 - { id: 1, class: _ }
752 - { id: 2, class: _ }
753 - { id: 3, class: _ }
754 - { id: 4, class: _ }
755 - { id: 5, class: _ }
758 liveins: $xmm0, $xmm1
760 ; CHECK-LABEL: name: fcmp_double_olt
761 ; CHECK: liveins: $xmm0, $xmm1
763 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
764 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
765 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
766 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
767 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(olt), [[TRUNC]](s64), [[TRUNC1]]
768 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
769 ; CHECK-NEXT: RET 0, implicit $al
770 %2:_(s128) = COPY $xmm0
771 %0:_(s64) = G_TRUNC %2(s128)
772 %3:_(s128) = COPY $xmm1
773 %1:_(s64) = G_TRUNC %3(s128)
774 %4:_(s1) = G_FCMP floatpred(olt), %0(s64), %1
775 %5:_(s8) = G_ANYEXT %4(s1)
781 name: fcmp_double_ole
783 tracksRegLiveness: true
785 - { id: 0, class: _ }
786 - { id: 1, class: _ }
787 - { id: 2, class: _ }
788 - { id: 3, class: _ }
789 - { id: 4, class: _ }
790 - { id: 5, class: _ }
793 liveins: $xmm0, $xmm1
795 ; CHECK-LABEL: name: fcmp_double_ole
796 ; CHECK: liveins: $xmm0, $xmm1
798 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
799 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
800 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
801 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
802 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ole), [[TRUNC]](s64), [[TRUNC1]]
803 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
804 ; CHECK-NEXT: RET 0, implicit $al
805 %2:_(s128) = COPY $xmm0
806 %0:_(s64) = G_TRUNC %2(s128)
807 %3:_(s128) = COPY $xmm1
808 %1:_(s64) = G_TRUNC %3(s128)
809 %4:_(s1) = G_FCMP floatpred(ole), %0(s64), %1
810 %5:_(s8) = G_ANYEXT %4(s1)
816 name: fcmp_double_one
818 tracksRegLiveness: true
820 - { id: 0, class: _ }
821 - { id: 1, class: _ }
822 - { id: 2, class: _ }
823 - { id: 3, class: _ }
824 - { id: 4, class: _ }
825 - { id: 5, class: _ }
828 liveins: $xmm0, $xmm1
830 ; CHECK-LABEL: name: fcmp_double_one
831 ; CHECK: liveins: $xmm0, $xmm1
833 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
834 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
835 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
836 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
837 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(one), [[TRUNC]](s64), [[TRUNC1]]
838 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
839 ; CHECK-NEXT: RET 0, implicit $al
840 %2:_(s128) = COPY $xmm0
841 %0:_(s64) = G_TRUNC %2(s128)
842 %3:_(s128) = COPY $xmm1
843 %1:_(s64) = G_TRUNC %3(s128)
844 %4:_(s1) = G_FCMP floatpred(one), %0(s64), %1
845 %5:_(s8) = G_ANYEXT %4(s1)
851 name: fcmp_double_ord
853 tracksRegLiveness: true
855 - { id: 0, class: _ }
856 - { id: 1, class: _ }
857 - { id: 2, class: _ }
858 - { id: 3, class: _ }
859 - { id: 4, class: _ }
860 - { id: 5, class: _ }
863 liveins: $xmm0, $xmm1
865 ; CHECK-LABEL: name: fcmp_double_ord
866 ; CHECK: liveins: $xmm0, $xmm1
868 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
869 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
870 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
871 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
872 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ord), [[TRUNC]](s64), [[TRUNC1]]
873 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
874 ; CHECK-NEXT: RET 0, implicit $al
875 %2:_(s128) = COPY $xmm0
876 %0:_(s64) = G_TRUNC %2(s128)
877 %3:_(s128) = COPY $xmm1
878 %1:_(s64) = G_TRUNC %3(s128)
879 %4:_(s1) = G_FCMP floatpred(ord), %0(s64), %1
880 %5:_(s8) = G_ANYEXT %4(s1)
886 name: fcmp_double_uno
888 tracksRegLiveness: true
890 - { id: 0, class: _ }
891 - { id: 1, class: _ }
892 - { id: 2, class: _ }
893 - { id: 3, class: _ }
894 - { id: 4, class: _ }
895 - { id: 5, class: _ }
898 liveins: $xmm0, $xmm1
900 ; CHECK-LABEL: name: fcmp_double_uno
901 ; CHECK: liveins: $xmm0, $xmm1
903 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
904 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
905 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
906 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
907 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uno), [[TRUNC]](s64), [[TRUNC1]]
908 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
909 ; CHECK-NEXT: RET 0, implicit $al
910 %2:_(s128) = COPY $xmm0
911 %0:_(s64) = G_TRUNC %2(s128)
912 %3:_(s128) = COPY $xmm1
913 %1:_(s64) = G_TRUNC %3(s128)
914 %4:_(s1) = G_FCMP floatpred(uno), %0(s64), %1
915 %5:_(s8) = G_ANYEXT %4(s1)
921 name: fcmp_double_ueq
923 tracksRegLiveness: true
925 - { id: 0, class: _ }
926 - { id: 1, class: _ }
927 - { id: 2, class: _ }
928 - { id: 3, class: _ }
929 - { id: 4, class: _ }
930 - { id: 5, class: _ }
933 liveins: $xmm0, $xmm1
935 ; CHECK-LABEL: name: fcmp_double_ueq
936 ; CHECK: liveins: $xmm0, $xmm1
938 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
939 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
940 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
941 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
942 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ueq), [[TRUNC]](s64), [[TRUNC1]]
943 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
944 ; CHECK-NEXT: RET 0, implicit $al
945 %2:_(s128) = COPY $xmm0
946 %0:_(s64) = G_TRUNC %2(s128)
947 %3:_(s128) = COPY $xmm1
948 %1:_(s64) = G_TRUNC %3(s128)
949 %4:_(s1) = G_FCMP floatpred(ueq), %0(s64), %1
950 %5:_(s8) = G_ANYEXT %4(s1)
956 name: fcmp_double_ugt
958 tracksRegLiveness: true
960 - { id: 0, class: _ }
961 - { id: 1, class: _ }
962 - { id: 2, class: _ }
963 - { id: 3, class: _ }
964 - { id: 4, class: _ }
965 - { id: 5, class: _ }
968 liveins: $xmm0, $xmm1
970 ; CHECK-LABEL: name: fcmp_double_ugt
971 ; CHECK: liveins: $xmm0, $xmm1
973 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
974 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
975 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
976 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
977 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ugt), [[TRUNC]](s64), [[TRUNC1]]
978 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
979 ; CHECK-NEXT: RET 0, implicit $al
980 %2:_(s128) = COPY $xmm0
981 %0:_(s64) = G_TRUNC %2(s128)
982 %3:_(s128) = COPY $xmm1
983 %1:_(s64) = G_TRUNC %3(s128)
984 %4:_(s1) = G_FCMP floatpred(ugt), %0(s64), %1
985 %5:_(s8) = G_ANYEXT %4(s1)
991 name: fcmp_double_uge
993 tracksRegLiveness: true
995 - { id: 0, class: _ }
996 - { id: 1, class: _ }
997 - { id: 2, class: _ }
998 - { id: 3, class: _ }
999 - { id: 4, class: _ }
1000 - { id: 5, class: _ }
1003 liveins: $xmm0, $xmm1
1005 ; CHECK-LABEL: name: fcmp_double_uge
1006 ; CHECK: liveins: $xmm0, $xmm1
1007 ; CHECK-NEXT: {{ $}}
1008 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1009 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1010 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1011 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1012 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(uge), [[TRUNC]](s64), [[TRUNC1]]
1013 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
1014 ; CHECK-NEXT: RET 0, implicit $al
1015 %2:_(s128) = COPY $xmm0
1016 %0:_(s64) = G_TRUNC %2(s128)
1017 %3:_(s128) = COPY $xmm1
1018 %1:_(s64) = G_TRUNC %3(s128)
1019 %4:_(s1) = G_FCMP floatpred(uge), %0(s64), %1
1020 %5:_(s8) = G_ANYEXT %4(s1)
1026 name: fcmp_double_ult
1028 tracksRegLiveness: true
1030 - { id: 0, class: _ }
1031 - { id: 1, class: _ }
1032 - { id: 2, class: _ }
1033 - { id: 3, class: _ }
1034 - { id: 4, class: _ }
1035 - { id: 5, class: _ }
1038 liveins: $xmm0, $xmm1
1040 ; CHECK-LABEL: name: fcmp_double_ult
1041 ; CHECK: liveins: $xmm0, $xmm1
1042 ; CHECK-NEXT: {{ $}}
1043 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1044 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1045 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1046 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1047 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ult), [[TRUNC]](s64), [[TRUNC1]]
1048 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
1049 ; CHECK-NEXT: RET 0, implicit $al
1050 %2:_(s128) = COPY $xmm0
1051 %0:_(s64) = G_TRUNC %2(s128)
1052 %3:_(s128) = COPY $xmm1
1053 %1:_(s64) = G_TRUNC %3(s128)
1054 %4:_(s1) = G_FCMP floatpred(ult), %0(s64), %1
1055 %5:_(s8) = G_ANYEXT %4(s1)
1061 name: fcmp_double_ule
1063 tracksRegLiveness: true
1065 - { id: 0, class: _ }
1066 - { id: 1, class: _ }
1067 - { id: 2, class: _ }
1068 - { id: 3, class: _ }
1069 - { id: 4, class: _ }
1070 - { id: 5, class: _ }
1073 liveins: $xmm0, $xmm1
1075 ; CHECK-LABEL: name: fcmp_double_ule
1076 ; CHECK: liveins: $xmm0, $xmm1
1077 ; CHECK-NEXT: {{ $}}
1078 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1079 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1080 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1081 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1082 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(ule), [[TRUNC]](s64), [[TRUNC1]]
1083 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
1084 ; CHECK-NEXT: RET 0, implicit $al
1085 %2:_(s128) = COPY $xmm0
1086 %0:_(s64) = G_TRUNC %2(s128)
1087 %3:_(s128) = COPY $xmm1
1088 %1:_(s64) = G_TRUNC %3(s128)
1089 %4:_(s1) = G_FCMP floatpred(ule), %0(s64), %1
1090 %5:_(s8) = G_ANYEXT %4(s1)
1096 name: fcmp_double_une
1098 tracksRegLiveness: true
1100 - { id: 0, class: _ }
1101 - { id: 1, class: _ }
1102 - { id: 2, class: _ }
1103 - { id: 3, class: _ }
1104 - { id: 4, class: _ }
1105 - { id: 5, class: _ }
1108 liveins: $xmm0, $xmm1
1110 ; CHECK-LABEL: name: fcmp_double_une
1111 ; CHECK: liveins: $xmm0, $xmm1
1112 ; CHECK-NEXT: {{ $}}
1113 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
1114 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
1115 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
1116 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
1117 ; CHECK-NEXT: [[FCMP:%[0-9]+]]:_(s8) = G_FCMP floatpred(une), [[TRUNC]](s64), [[TRUNC1]]
1118 ; CHECK-NEXT: $al = COPY [[FCMP]](s8)
1119 ; CHECK-NEXT: RET 0, implicit $al
1120 %2:_(s128) = COPY $xmm0
1121 %0:_(s64) = G_TRUNC %2(s128)
1122 %3:_(s128) = COPY $xmm1
1123 %1:_(s64) = G_TRUNC %3(s128)
1124 %4:_(s1) = G_FCMP floatpred(une), %0(s64), %1
1125 %5:_(s8) = G_ANYEXT %4(s1)