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
324 ; Should be inverted. Needs two compares.
326 ; CHECK-LABEL: name: uno_zero
327 ; CHECK: liveins: $q0, $q1
329 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
330 ; CHECK-NEXT: [[FCMGEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGEZ %lhs
331 ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
332 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMLTZ]], [[FCMGEZ]]
333 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
334 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
335 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[OR]], [[BUILD_VECTOR]]
336 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
337 ; CHECK-NEXT: RET_ReallyLR implicit $q0
338 %lhs:_(<2 x s64>) = COPY $q0
339 %zero:_(s64) = G_CONSTANT i64 0
340 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
341 %fcmp:_(<2 x s64>) = G_FCMP floatpred(uno), %lhs(<2 x s64>), %zero_vec
342 $q0 = COPY %fcmp(<2 x s64>)
343 RET_ReallyLR implicit $q0
354 ; Needs two compares. No invert.
356 ; CHECK-LABEL: name: ord
357 ; CHECK: liveins: $q0, $q1
359 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
360 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
361 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
362 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
363 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[FCMGT]], [[FCMGE]]
364 ; CHECK-NEXT: $q0 = COPY [[OR]](<2 x s64>)
365 ; CHECK-NEXT: RET_ReallyLR implicit $q0
366 %lhs:_(<2 x s64>) = COPY $q0
367 %rhs:_(<2 x s64>) = COPY $q1
368 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ord), %lhs(<2 x s64>), %rhs
369 $q0 = COPY %fcmp(<2 x s64>)
370 RET_ReallyLR implicit $q0
381 ; Needs two compares. No invert.
383 ; CHECK-LABEL: name: ord_zero
384 ; CHECK: liveins: $q0, $q1
386 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
387 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %lhs(<2 x s64>)
388 ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<2 x s64>)
389 ; CHECK-NEXT: RET_ReallyLR implicit $q0
390 %lhs:_(<2 x s64>) = COPY $q0
391 %zero:_(s64) = G_CONSTANT i64 0
392 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
393 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ord), %lhs(<2 x s64>), %zero_vec
394 $q0 = COPY %fcmp(<2 x s64>)
395 RET_ReallyLR implicit $q0
406 ; Should be inverted. Needs two compares.
408 ; CHECK-LABEL: name: ult
409 ; CHECK: liveins: $q0, $q1
411 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
412 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
413 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %lhs, %rhs(<2 x s64>)
414 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
415 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
416 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGE]], [[BUILD_VECTOR]]
417 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
418 ; CHECK-NEXT: RET_ReallyLR implicit $q0
419 %lhs:_(<2 x s64>) = COPY $q0
420 %rhs:_(<2 x s64>) = COPY $q1
421 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ult), %lhs(<2 x s64>), %rhs
422 $q0 = COPY %fcmp(<2 x s64>)
423 RET_ReallyLR implicit $q0
434 ; Should be inverted. Needs two compares.
436 ; CHECK-LABEL: name: ueq_zero
437 ; CHECK: liveins: $q0, $q1
439 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
440 ; CHECK-NEXT: [[FCMGEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGEZ %lhs
441 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
442 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
443 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGEZ]], [[BUILD_VECTOR]]
444 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
445 ; CHECK-NEXT: RET_ReallyLR implicit $q0
446 %lhs:_(<2 x s64>) = COPY $q0
447 %zero:_(s64) = G_CONSTANT i64 0
448 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
449 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ult), %lhs(<2 x s64>), %zero_vec
450 $q0 = COPY %fcmp(<2 x s64>)
451 RET_ReallyLR implicit $q0
462 ; Should be inverted. Needs two compares.
464 ; CHECK-LABEL: name: ule
465 ; CHECK: liveins: $q0, $q1
467 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
468 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
469 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %lhs, %rhs(<2 x s64>)
470 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
471 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
472 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGT]], [[BUILD_VECTOR]]
473 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
474 ; CHECK-NEXT: RET_ReallyLR implicit $q0
475 %lhs:_(<2 x s64>) = COPY $q0
476 %rhs:_(<2 x s64>) = COPY $q1
477 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ule), %lhs(<2 x s64>), %rhs
478 $q0 = COPY %fcmp(<2 x s64>)
479 RET_ReallyLR implicit $q0
490 ; Should be inverted. Needs two compares.
492 ; CHECK-LABEL: name: ule_zero
493 ; CHECK: liveins: $q0, $q1
495 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
496 ; CHECK-NEXT: [[FCMGTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMGTZ %lhs
497 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
498 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
499 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGTZ]], [[BUILD_VECTOR]]
500 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
501 ; CHECK-NEXT: RET_ReallyLR implicit $q0
502 %lhs:_(<2 x s64>) = COPY $q0
503 %zero:_(s64) = G_CONSTANT i64 0
504 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
505 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ule), %lhs(<2 x s64>), %zero_vec
506 $q0 = COPY %fcmp(<2 x s64>)
507 RET_ReallyLR implicit $q0
518 ; Should be inverted. Needs two compares.
520 ; CHECK-LABEL: name: ugt
521 ; CHECK: liveins: $q0, $q1
523 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
524 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
525 ; CHECK-NEXT: [[FCMGE:%[0-9]+]]:_(<2 x s64>) = G_FCMGE %rhs, %lhs(<2 x s64>)
526 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
527 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
528 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGE]], [[BUILD_VECTOR]]
529 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
530 ; CHECK-NEXT: RET_ReallyLR implicit $q0
531 %lhs:_(<2 x s64>) = COPY $q0
532 %rhs:_(<2 x s64>) = COPY $q1
533 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ugt), %lhs(<2 x s64>), %rhs
534 $q0 = COPY %fcmp(<2 x s64>)
535 RET_ReallyLR implicit $q0
546 ; Should be inverted. Needs two compares.
548 ; CHECK-LABEL: name: ugt_zero
549 ; CHECK: liveins: $q0, $q1
551 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
552 ; CHECK-NEXT: [[FCMLEZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLEZ %lhs
553 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
554 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
555 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMLEZ]], [[BUILD_VECTOR]]
556 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
557 ; CHECK-NEXT: RET_ReallyLR implicit $q0
558 %lhs:_(<2 x s64>) = COPY $q0
559 %zero:_(s64) = G_CONSTANT i64 0
560 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
561 %fcmp:_(<2 x s64>) = G_FCMP floatpred(ugt), %lhs(<2 x s64>), %zero_vec
562 $q0 = COPY %fcmp(<2 x s64>)
563 RET_ReallyLR implicit $q0
574 ; Should be inverted. Needs two compares.
576 ; CHECK-LABEL: name: uge
577 ; CHECK: liveins: $q0, $q1
579 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
580 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
581 ; CHECK-NEXT: [[FCMGT:%[0-9]+]]:_(<2 x s64>) = G_FCMGT %rhs, %lhs(<2 x s64>)
582 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
583 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
584 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMGT]], [[BUILD_VECTOR]]
585 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
586 ; CHECK-NEXT: RET_ReallyLR implicit $q0
587 %lhs:_(<2 x s64>) = COPY $q0
588 %rhs:_(<2 x s64>) = COPY $q1
589 %fcmp:_(<2 x s64>) = G_FCMP floatpred(uge), %lhs(<2 x s64>), %rhs
590 $q0 = COPY %fcmp(<2 x s64>)
591 RET_ReallyLR implicit $q0
602 ; Should be inverted. Needs two compares.
604 ; CHECK-LABEL: name: uge_zero
605 ; CHECK: liveins: $q0, $q1
607 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
608 ; CHECK-NEXT: [[FCMLTZ:%[0-9]+]]:_(<2 x s64>) = G_FCMLTZ %lhs
609 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
610 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
611 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMLTZ]], [[BUILD_VECTOR]]
612 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
613 ; CHECK-NEXT: RET_ReallyLR implicit $q0
614 %lhs:_(<2 x s64>) = COPY $q0
615 %zero:_(s64) = G_CONSTANT i64 0
616 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
617 %fcmp:_(<2 x s64>) = G_FCMP floatpred(uge), %lhs(<2 x s64>), %zero_vec
618 $q0 = COPY %fcmp(<2 x s64>)
619 RET_ReallyLR implicit $q0
632 ; CHECK-LABEL: name: une
633 ; CHECK: liveins: $q0, $q1
635 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
636 ; CHECK-NEXT: %rhs:_(<2 x s64>) = COPY $q1
637 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQ %lhs, %rhs(<2 x s64>)
638 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
639 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
640 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQ]], [[BUILD_VECTOR]]
641 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
642 ; CHECK-NEXT: RET_ReallyLR implicit $q0
643 %lhs:_(<2 x s64>) = COPY $q0
644 %rhs:_(<2 x s64>) = COPY $q1
645 %fcmp:_(<2 x s64>) = G_FCMP floatpred(une), %lhs(<2 x s64>), %rhs
646 $q0 = COPY %fcmp(<2 x s64>)
647 RET_ReallyLR implicit $q0
660 ; CHECK-LABEL: name: une_zero
661 ; CHECK: liveins: $q0, $q1
663 ; CHECK-NEXT: %lhs:_(<2 x s64>) = COPY $q0
664 ; CHECK-NEXT: [[FCMEQZ:%[0-9]+]]:_(<2 x s64>) = G_FCMEQZ %lhs
665 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
666 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
667 ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[FCMEQZ]], [[BUILD_VECTOR]]
668 ; CHECK-NEXT: $q0 = COPY [[XOR]](<2 x s64>)
669 ; CHECK-NEXT: RET_ReallyLR implicit $q0
670 %lhs:_(<2 x s64>) = COPY $q0
671 %zero:_(s64) = G_CONSTANT i64 0
672 %zero_vec:_(<2 x s64>) = G_BUILD_VECTOR %zero, %zero
673 %fcmp:_(<2 x s64>) = G_FCMP floatpred(une), %lhs(<2 x s64>), %zero_vec
674 $q0 = COPY %fcmp(<2 x s64>)
675 RET_ReallyLR implicit $q0
686 ; CHECK-LABEL: name: lower_v8s16
687 ; CHECK: liveins: $q0, $q1
689 ; CHECK-NEXT: %lhs:_(<8 x s16>) = COPY $q0
690 ; CHECK-NEXT: %rhs:_(<8 x s16>) = COPY $q1
691 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<8 x s16>) = G_FCMEQ %lhs, %rhs(<8 x s16>)
692 ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<8 x s16>)
693 ; CHECK-NEXT: RET_ReallyLR implicit $q0
694 %lhs:_(<8 x s16>) = COPY $q0
695 %rhs:_(<8 x s16>) = COPY $q1
696 %fcmp:_(<8 x s16>) = G_FCMP floatpred(oeq), %lhs(<8 x s16>), %rhs
697 $q0 = COPY %fcmp(<8 x s16>)
698 RET_ReallyLR implicit $q0
709 ; CHECK-LABEL: name: lower_v4s16
710 ; CHECK: liveins: $d0, $d1
712 ; CHECK-NEXT: %lhs:_(<4 x s16>) = COPY $d0
713 ; CHECK-NEXT: %rhs:_(<4 x s16>) = COPY $d1
714 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<4 x s16>) = G_FCMEQ %lhs, %rhs(<4 x s16>)
715 ; CHECK-NEXT: $d0 = COPY [[FCMEQ]](<4 x s16>)
716 ; CHECK-NEXT: RET_ReallyLR implicit $d0
717 %lhs:_(<4 x s16>) = COPY $d0
718 %rhs:_(<4 x s16>) = COPY $d1
719 %fcmp:_(<4 x s16>) = G_FCMP floatpred(oeq), %lhs(<4 x s16>), %rhs
720 $d0 = COPY %fcmp(<4 x s16>)
721 RET_ReallyLR implicit $d0
732 ; CHECK-LABEL: name: is_not_nan
733 ; CHECK: liveins: $q0, $q1
735 ; CHECK-NEXT: %lhs:_(<4 x s32>) = COPY $q0
736 ; CHECK-NEXT: [[FCMEQ:%[0-9]+]]:_(<4 x s32>) = G_FCMEQ %lhs, %lhs(<4 x s32>)
737 ; CHECK-NEXT: $q0 = COPY [[FCMEQ]](<4 x s32>)
738 ; CHECK-NEXT: RET_ReallyLR implicit $q0
739 %lhs:_(<4 x s32>) = COPY $q0
740 %zero:_(s32) = G_FCONSTANT float 0.000000e+00
741 %veczero:_(<4 x s32>) = G_BUILD_VECTOR %zero, %zero, %zero, %zero
742 %fcmp:_(<4 x s32>) = G_FCMP floatpred(ord), %lhs(<4 x s32>), %veczero
743 $q0 = COPY %fcmp(<4 x s32>)
744 RET_ReallyLR implicit $q0