1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-postlegalizer-lowering -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s
11 ; CHECK-LABEL: name: oeq
12 ; CHECK: liveins: $q0, $q1
14 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
15 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
16 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %rhs(<2 x s64>)
17 ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<2 x s64>)
18 ; CHECK-NEXT: RET_ReallyLR implicit $q0
19 %lhs:_(<2 x s64>) = COPY $q0
20 %rhs:_(<2 x s64>) = COPY $q1
21 %fcmp:_(<2 x s64>) = G_FCMP floatpred(oeq), %lhs(<2 x s64>), %rhs
22 $q0 = COPY %fcmp(<2 x s64>)
23 RET_ReallyLR implicit $q0
34 ; Should be inverted. Needs two compares.
36 ; CHECK-LABEL: name: oeq_zero
37 ; CHECK: liveins: $q0, $q1
39 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
40 ; CHECK-NEXT: [[FCMEQZ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQZ %lhs
41 ; CHECK-NEXT: $q0 = COPY [[FCMEQZ]](<2 x s64>)
42 ; CHECK-NEXT: RET_ReallyLR implicit $q0
43 %lhs:_(<2 x s64>) = COPY $q0
44 %zero:_(s64) = G_CONSTANT i64 0
45 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
46 %fcmp:_(<2 x s64>) = G_FCMP floatpred(oeq), %lhs(<2 x s64>), %zero_vec
47 $q0 = COPY %fcmp(<2 x s64>)
48 RET_ReallyLR implicit $q0
59 ; CHECK-LABEL: name: ogt
60 ; CHECK: liveins: $q0, $q1
62 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
63 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
64 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %lhs, %rhs(<2 x s64>)
65 ; CHECK-NEXT: $q0 = COPY [[FCMGT]](<2 x s64>)
66 ; CHECK-NEXT: RET_ReallyLR implicit $q0
67 %lhs:_(<2 x s64>) = COPY $q0
68 %rhs:_(<2 x s64>) = COPY $q1
69 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ogt), %lhs(<2 x s64>), %rhs
70 $q0 = COPY %fcmp(<2 x s64>)
71 RET_ReallyLR implicit $q0
81 ; CHECK-LABEL: name: ogt_zero
82 ; CHECK: liveins: $q0, $q1
84 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
85 ; CHECK-NEXT: [[FCMGTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGTZ %lhs
86 ; CHECK-NEXT: $q0 = COPY [[FCMGTZ]](<2 x s64>)
87 ; CHECK-NEXT: RET_ReallyLR implicit $q0
88 %lhs:_(<2 x s64>) = COPY $q0
89 %zero:_(s64) = G_CONSTANT i64 0
90 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
91 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ogt), %lhs(<2 x s64>), %zero_vec
92 $q0 = COPY %fcmp(<2 x s64>)
93 RET_ReallyLR implicit $q0
103 ; CHECK-LABEL: name: oge
104 ; CHECK: liveins: $q0, $q1
106 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
107 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
108 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
109 ; CHECK-NEXT: $q0 = COPY [[FCMGE]](<2 x s64>)
110 ; CHECK-NEXT: RET_ReallyLR implicit $q0
111 %lhs:_(<2 x s64>) = COPY $q0
112 %rhs:_(<2 x s64>) = COPY $q1
113 %fcmp:_(<2 x s64>) = G_FCMP floatpred(oge), %lhs(<2 x s64>), %rhs
114 $q0 = COPY %fcmp(<2 x s64>)
115 RET_ReallyLR implicit $q0
126 ; Should be inverted. Needs two compares.
128 ; CHECK-LABEL: name: oge_zero
129 ; CHECK: liveins: $q0, $q1
131 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
132 ; CHECK-NEXT: [[FCMGEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGEZ %lhs
133 ; CHECK-NEXT: $q0 = COPY [[FCMGEZ]](<2 x s64>)
134 ; CHECK-NEXT: RET_ReallyLR implicit $q0
135 %lhs:_(<2 x s64>) = COPY $q0
136 %zero:_(s64) = G_CONSTANT i64 0
137 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
138 %fcmp:_(<2 x s64>) = G_FCMP floatpred(oge), %lhs(<2 x s64>), %zero_vec
139 $q0 = COPY %fcmp(<2 x s64>)
140 RET_ReallyLR implicit $q0
151 ; CHECK-LABEL: name: olt
152 ; CHECK: liveins: $q0, $q1
154 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
155 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
156 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
157 ; CHECK-NEXT: $q0 = COPY [[FCMGT]](<2 x s64>)
158 ; CHECK-NEXT: RET_ReallyLR implicit $q0
159 %lhs:_(<2 x s64>) = COPY $q0
160 %rhs:_(<2 x s64>) = COPY $q1
161 %fcmp:_(<2 x s64>) = G_FCMP floatpred(olt), %lhs(<2 x s64>), %rhs
162 $q0 = COPY %fcmp(<2 x s64>)
163 RET_ReallyLR implicit $q0
173 ; CHECK-LABEL: name: olt_zero
174 ; CHECK: liveins: $q0, $q1
176 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
177 ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
178 ; CHECK-NEXT: $q0 = COPY [[FCMLTZ]](<2 x s64>)
179 ; CHECK-NEXT: RET_ReallyLR implicit $q0
180 %lhs:_(<2 x s64>) = COPY $q0
181 %zero:_(s64) = G_CONSTANT i64 0
182 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
183 %fcmp:_(<2 x s64>) = G_FCMP floatpred(olt), %lhs(<2 x s64>), %zero_vec
184 $q0 = COPY %fcmp(<2 x s64>)
185 RET_ReallyLR implicit $q0
195 ; CHECK-LABEL: name: ole
196 ; CHECK: liveins: $q0, $q1
198 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
199 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
200 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %rhs, %lhs(<2 x s64>)
201 ; CHECK-NEXT: $q0 = COPY [[FCMGE]](<2 x s64>)
202 ; CHECK-NEXT: RET_ReallyLR implicit $q0
203 %lhs:_(<2 x s64>) = COPY $q0
204 %rhs:_(<2 x s64>) = COPY $q1
205 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ole), %lhs(<2 x s64>), %rhs
206 $q0 = COPY %fcmp(<2 x s64>)
207 RET_ReallyLR implicit $q0
217 ; CHECK-LABEL: name: ole_zero
218 ; CHECK: liveins: $q0, $q1
220 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
221 ; CHECK-NEXT: [[FCMLEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLEZ %lhs
222 ; CHECK-NEXT: $q0 = COPY [[FCMLEZ]](<2 x s64>)
223 ; CHECK-NEXT: RET_ReallyLR implicit $q0
224 %lhs:_(<2 x s64>) = COPY $q0
225 %zero:_(s64) = G_CONSTANT i64 0
226 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
227 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ole), %lhs(<2 x s64>), %zero_vec
228 $q0 = COPY %fcmp(<2 x s64>)
229 RET_ReallyLR implicit $q0
242 ; CHECK-LABEL: name: one
243 ; CHECK: liveins: $q0, $q1
245 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
246 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
247 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %lhs, %rhs(<2 x s64>)
248 ; CHECK-NEXT: [[FCMGT1:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
249 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMGT1]], [[FCMGT]]
250 ; CHECK-NEXT: $q0 = COPY [[OR]](<2 x s64>)
251 ; CHECK-NEXT: RET_ReallyLR implicit $q0
252 %lhs:_(<2 x s64>) = COPY $q0
253 %rhs:_(<2 x s64>) = COPY $q1
254 %fcmp:_(<2 x s64>) = G_FCMP floatpred(one), %lhs(<2 x s64>), %rhs
255 $q0 = COPY %fcmp(<2 x s64>)
256 RET_ReallyLR implicit $q0
269 ; CHECK-LABEL: name: one_zero
270 ; CHECK: liveins: $q0, $q1
272 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
273 ; CHECK-NEXT: [[FCMGTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGTZ %lhs
274 ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
275 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMLTZ]], [[FCMGTZ]]
276 ; CHECK-NEXT: $q0 = COPY [[OR]](<2 x s64>)
277 ; CHECK-NEXT: RET_ReallyLR implicit $q0
278 %lhs:_(<2 x s64>) = COPY $q0
279 %zero:_(s64) = G_CONSTANT i64 0
280 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
281 %fcmp:_(<2 x s64>) = G_FCMP floatpred(one), %lhs(<2 x s64>), %zero_vec
282 $q0 = COPY %fcmp(<2 x s64>)
283 RET_ReallyLR implicit $q0
294 ; Should be inverted. Needs two compares.
296 ; CHECK-LABEL: name: uno
297 ; CHECK: liveins: $q0, $q1
299 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
300 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
301 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
302 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
303 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMGT]], [[FCMGE]]
304 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
305 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
306 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[OR]], [[BUILD_VECTOR]]
307 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
308 ; CHECK-NEXT: RET_ReallyLR implicit $q0
309 %lhs:_(<2 x s64>) = COPY $q0
310 %rhs:_(<2 x s64>) = COPY $q1
311 %fcmp:_(<2 x s64>) = G_FCMP floatpred(uno), %lhs(<2 x s64>), %rhs
312 $q0 = COPY %fcmp(<2 x s64>)
313 RET_ReallyLR implicit $q0
325 ; CHECK-LABEL: name: uno_zero
326 ; CHECK: liveins: $q0, $q1
328 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
329 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %lhs(<2 x s64>)
330 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
331 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
332 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQ]], [[BUILD_VECTOR]]
333 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
334 ; CHECK-NEXT: RET_ReallyLR implicit $q0
335 %lhs:_(<2 x s64>) = COPY $q0
336 %zero:_(s64) = G_CONSTANT i64 0
337 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
338 %fcmp:_(<2 x s64>) = G_FCMP floatpred(uno), %lhs(<2 x s64>), %zero_vec
339 $q0 = COPY %fcmp(<2 x s64>)
340 RET_ReallyLR implicit $q0
351 ; Needs two compares. No invert.
353 ; CHECK-LABEL: name: ord
354 ; CHECK: liveins: $q0, $q1
356 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
357 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
358 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
359 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
360 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMGT]], [[FCMGE]]
361 ; CHECK-NEXT: $q0 = COPY [[OR]](<2 x s64>)
362 ; CHECK-NEXT: RET_ReallyLR implicit $q0
363 %lhs:_(<2 x s64>) = COPY $q0
364 %rhs:_(<2 x s64>) = COPY $q1
365 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ord), %lhs(<2 x s64>), %rhs
366 $q0 = COPY %fcmp(<2 x s64>)
367 RET_ReallyLR implicit $q0
378 ; Needs two compares. No invert.
380 ; CHECK-LABEL: name: ord_zero
381 ; CHECK: liveins: $q0, $q1
383 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
384 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %lhs(<2 x s64>)
385 ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<2 x s64>)
386 ; CHECK-NEXT: RET_ReallyLR implicit $q0
387 %lhs:_(<2 x s64>) = COPY $q0
388 %zero:_(s64) = G_CONSTANT i64 0
389 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
390 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ord), %lhs(<2 x s64>), %zero_vec
391 $q0 = COPY %fcmp(<2 x s64>)
392 RET_ReallyLR implicit $q0
403 ; Should be inverted. Needs two compares.
405 ; CHECK-LABEL: name: ult
406 ; CHECK: liveins: $q0, $q1
408 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
409 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
410 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
411 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
412 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
413 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGE]], [[BUILD_VECTOR]]
414 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
415 ; CHECK-NEXT: RET_ReallyLR implicit $q0
416 %lhs:_(<2 x s64>) = COPY $q0
417 %rhs:_(<2 x s64>) = COPY $q1
418 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ult), %lhs(<2 x s64>), %rhs
419 $q0 = COPY %fcmp(<2 x s64>)
420 RET_ReallyLR implicit $q0
431 ; Should be inverted. Needs two compares.
433 ; CHECK-LABEL: name: ueq_zero
434 ; CHECK: liveins: $q0, $q1
436 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
437 ; CHECK-NEXT: [[FCMGEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGEZ %lhs
438 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
439 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
440 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGEZ]], [[BUILD_VECTOR]]
441 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
442 ; CHECK-NEXT: RET_ReallyLR implicit $q0
443 %lhs:_(<2 x s64>) = COPY $q0
444 %zero:_(s64) = G_CONSTANT i64 0
445 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
446 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ult), %lhs(<2 x s64>), %zero_vec
447 $q0 = COPY %fcmp(<2 x s64>)
448 RET_ReallyLR implicit $q0
459 ; Should be inverted. Needs two compares.
461 ; CHECK-LABEL: name: ule
462 ; CHECK: liveins: $q0, $q1
464 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
465 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
466 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %lhs, %rhs(<2 x s64>)
467 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
468 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
469 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGT]], [[BUILD_VECTOR]]
470 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
471 ; CHECK-NEXT: RET_ReallyLR implicit $q0
472 %lhs:_(<2 x s64>) = COPY $q0
473 %rhs:_(<2 x s64>) = COPY $q1
474 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ule), %lhs(<2 x s64>), %rhs
475 $q0 = COPY %fcmp(<2 x s64>)
476 RET_ReallyLR implicit $q0
487 ; Should be inverted. Needs two compares.
489 ; CHECK-LABEL: name: ule_zero
490 ; CHECK: liveins: $q0, $q1
492 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
493 ; CHECK-NEXT: [[FCMGTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGTZ %lhs
494 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
495 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
496 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGTZ]], [[BUILD_VECTOR]]
497 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
498 ; CHECK-NEXT: RET_ReallyLR implicit $q0
499 %lhs:_(<2 x s64>) = COPY $q0
500 %zero:_(s64) = G_CONSTANT i64 0
501 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
502 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ule), %lhs(<2 x s64>), %zero_vec
503 $q0 = COPY %fcmp(<2 x s64>)
504 RET_ReallyLR implicit $q0
515 ; Should be inverted. Needs two compares.
517 ; CHECK-LABEL: name: ugt
518 ; CHECK: liveins: $q0, $q1
520 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
521 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
522 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %rhs, %lhs(<2 x s64>)
523 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
524 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
525 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGE]], [[BUILD_VECTOR]]
526 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
527 ; CHECK-NEXT: RET_ReallyLR implicit $q0
528 %lhs:_(<2 x s64>) = COPY $q0
529 %rhs:_(<2 x s64>) = COPY $q1
530 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ugt), %lhs(<2 x s64>), %rhs
531 $q0 = COPY %fcmp(<2 x s64>)
532 RET_ReallyLR implicit $q0
543 ; Should be inverted. Needs two compares.
545 ; CHECK-LABEL: name: ugt_zero
546 ; CHECK: liveins: $q0, $q1
548 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
549 ; CHECK-NEXT: [[FCMLEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLEZ %lhs
550 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
551 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
552 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMLEZ]], [[BUILD_VECTOR]]
553 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
554 ; CHECK-NEXT: RET_ReallyLR implicit $q0
555 %lhs:_(<2 x s64>) = COPY $q0
556 %zero:_(s64) = G_CONSTANT i64 0
557 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
558 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ugt), %lhs(<2 x s64>), %zero_vec
559 $q0 = COPY %fcmp(<2 x s64>)
560 RET_ReallyLR implicit $q0
571 ; Should be inverted. Needs two compares.
573 ; CHECK-LABEL: name: uge
574 ; CHECK: liveins: $q0, $q1
576 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
577 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
578 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
579 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
580 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
581 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGT]], [[BUILD_VECTOR]]
582 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
583 ; CHECK-NEXT: RET_ReallyLR implicit $q0
584 %lhs:_(<2 x s64>) = COPY $q0
585 %rhs:_(<2 x s64>) = COPY $q1
586 %fcmp:_(<2 x s64>) = G_FCMP floatpred(uge), %lhs(<2 x s64>), %rhs
587 $q0 = COPY %fcmp(<2 x s64>)
588 RET_ReallyLR implicit $q0
599 ; Should be inverted. Needs two compares.
601 ; CHECK-LABEL: name: uge_zero
602 ; CHECK: liveins: $q0, $q1
604 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
605 ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
606 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
607 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
608 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMLTZ]], [[BUILD_VECTOR]]
609 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
610 ; CHECK-NEXT: RET_ReallyLR implicit $q0
611 %lhs:_(<2 x s64>) = COPY $q0
612 %zero:_(s64) = G_CONSTANT i64 0
613 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
614 %fcmp:_(<2 x s64>) = G_FCMP floatpred(uge), %lhs(<2 x s64>), %zero_vec
615 $q0 = COPY %fcmp(<2 x s64>)
616 RET_ReallyLR implicit $q0
629 ; CHECK-LABEL: name: une
630 ; CHECK: liveins: $q0, $q1
632 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
633 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
634 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %rhs(<2 x s64>)
635 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
636 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
637 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQ]], [[BUILD_VECTOR]]
638 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
639 ; CHECK-NEXT: RET_ReallyLR implicit $q0
640 %lhs:_(<2 x s64>) = COPY $q0
641 %rhs:_(<2 x s64>) = COPY $q1
642 %fcmp:_(<2 x s64>) = G_FCMP floatpred(une), %lhs(<2 x s64>), %rhs
643 $q0 = COPY %fcmp(<2 x s64>)
644 RET_ReallyLR implicit $q0
657 ; CHECK-LABEL: name: une_zero
658 ; CHECK: liveins: $q0, $q1
660 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
661 ; CHECK-NEXT: [[FCMEQZ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQZ %lhs
662 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
663 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
664 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQZ]], [[BUILD_VECTOR]]
665 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
666 ; CHECK-NEXT: RET_ReallyLR implicit $q0
667 %lhs:_(<2 x s64>) = COPY $q0
668 %zero:_(s64) = G_CONSTANT i64 0
669 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
670 %fcmp:_(<2 x s64>) = G_FCMP floatpred(une), %lhs(<2 x s64>), %zero_vec
671 $q0 = COPY %fcmp(<2 x s64>)
672 RET_ReallyLR implicit $q0
683 ; CHECK-LABEL: name: lower_v8s16
684 ; CHECK: liveins: $q0, $q1
686 ; CHECK-NEXT: %lhs:_(<8 x s16>) = COPY $q0
687 ; CHECK-NEXT: %rhs:_(<8 x s16>) = COPY $q1
688 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<8 x s16>) = G_FCMEQ %lhs, %rhs(<8 x s16>)
689 ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<8 x s16>)
690 ; CHECK-NEXT: RET_ReallyLR implicit $q0
691 %lhs:_(<8 x s16>) = COPY $q0
692 %rhs:_(<8 x s16>) = COPY $q1
693 %fcmp:_(<8 x s16>) = G_FCMP floatpred(oeq), %lhs(<8 x s16>), %rhs
694 $q0 = COPY %fcmp(<8 x s16>)
695 RET_ReallyLR implicit $q0
706 ; CHECK-LABEL: name: lower_v4s16
707 ; CHECK: liveins: $d0, $d1
709 ; CHECK-NEXT: %lhs:_(<4 x s16>) = COPY $d0
710 ; CHECK-NEXT: %rhs:_(<4 x s16>) = COPY $d1
711 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<4 x s16>) = G_FCMEQ %lhs, %rhs(<4 x s16>)
712 ; CHECK-NEXT: $d0 = COPY [[FCMEQ]](<4 x s16>)
713 ; CHECK-NEXT: RET_ReallyLR implicit $d0
714 %lhs:_(<4 x s16>) = COPY $d0
715 %rhs:_(<4 x s16>) = COPY $d1
716 %fcmp:_(<4 x s16>) = G_FCMP floatpred(oeq), %lhs(<4 x s16>), %rhs
717 $d0 = COPY %fcmp(<4 x s16>)
718 RET_ReallyLR implicit $d0
729 ; CHECK-LABEL: name: is_not_nan
730 ; CHECK: liveins: $q0, $q1
732 ; CHECK-NEXT: %lhs:_(<4 x s32>) = COPY $q0
733 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<4 x s32>) = G_FCMEQ %lhs, %lhs(<4 x s32>)
734 ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<4 x s32>)
735 ; CHECK-NEXT: RET_ReallyLR implicit $q0
736 %lhs:_(<4 x s32>) = COPY $q0
737 %zero:_(s32) = G_FCONSTANT float 0.000000e+00
738 %veczero:_(<4 x s32>) = G_BUILD_VECTOR %zero, %zero, %zero, %zero
739 %fcmp:_(<4 x s32>) = G_FCMP floatpred(ord), %lhs(<4 x s32>), %veczero
740 $q0 = COPY %fcmp(<4 x s32>)
741 RET_ReallyLR implicit $q0