1 ; RUN: llc < %s -mtriple=ve | FileCheck %s
3 ; Function Attrs: nounwind
4 define void @br_cc_i1_var(i1 zeroext %0, i1 zeroext %1) {
5 ; CHECK-LABEL: br_cc_i1_var:
7 ; CHECK-NEXT: xor %s0, %s0, %s1
8 ; CHECK-NEXT: brne.w 0, %s0, .LBB{{[0-9]+}}_2
13 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
14 ; CHECK-NEXT: b.l.t (, %s10)
16 br i1 %3, label %5, label %4
19 tail call void asm sideeffect "nop", ""()
26 ; Function Attrs: nounwind
27 define void @br_cc_i8_var(i8 signext %0, i8 signext %1) {
28 ; CHECK-LABEL: br_cc_i8_var:
30 ; CHECK-NEXT: brne.w %s0, %s1, .LBB{{[0-9]+}}_2
31 ; CHECK-NEXT: # %bb.1:
35 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
36 ; CHECK-NEXT: b.l.t (, %s10)
37 %3 = icmp eq i8 %0, %1
38 br i1 %3, label %4, label %5
41 tail call void asm sideeffect "nop", ""()
48 ; Function Attrs: nounwind
49 define void @br_cc_u8_var(i8 zeroext %0, i8 zeroext %1) {
50 ; CHECK-LABEL: br_cc_u8_var:
52 ; CHECK-NEXT: brne.w %s0, %s1, .LBB{{[0-9]+}}_2
53 ; CHECK-NEXT: # %bb.1:
57 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
58 ; CHECK-NEXT: b.l.t (, %s10)
59 %3 = icmp eq i8 %0, %1
60 br i1 %3, label %4, label %5
63 tail call void asm sideeffect "nop", ""()
70 ; Function Attrs: nounwind
71 define void @br_cc_i16_var(i16 signext %0, i16 signext %1) {
72 ; CHECK-LABEL: br_cc_i16_var:
74 ; CHECK-NEXT: brne.w %s0, %s1, .LBB{{[0-9]+}}_2
75 ; CHECK-NEXT: # %bb.1:
79 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
80 ; CHECK-NEXT: b.l.t (, %s10)
81 %3 = icmp eq i16 %0, %1
82 br i1 %3, label %4, label %5
85 tail call void asm sideeffect "nop", ""()
92 ; Function Attrs: nounwind
93 define void @br_cc_u16_var(i16 zeroext %0, i16 zeroext %1) {
94 ; CHECK-LABEL: br_cc_u16_var:
96 ; CHECK-NEXT: brne.w %s0, %s1, .LBB{{[0-9]+}}_2
97 ; CHECK-NEXT: # %bb.1:
100 ; CHECK-NEXT: #NO_APP
101 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
102 ; CHECK-NEXT: b.l.t (, %s10)
103 %3 = icmp eq i16 %0, %1
104 br i1 %3, label %4, label %5
107 tail call void asm sideeffect "nop", ""()
114 ; Function Attrs: nounwind
115 define void @br_cc_i32_var(i32 signext %0, i32 signext %1) {
116 ; CHECK-LABEL: br_cc_i32_var:
118 ; CHECK-NEXT: brne.w %s0, %s1, .LBB{{[0-9]+}}_2
119 ; CHECK-NEXT: # %bb.1:
122 ; CHECK-NEXT: #NO_APP
123 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
124 ; CHECK-NEXT: b.l.t (, %s10)
125 %3 = icmp eq i32 %0, %1
126 br i1 %3, label %4, label %5
129 tail call void asm sideeffect "nop", ""()
136 ; Function Attrs: nounwind
137 define void @br_cc_u32_var(i32 zeroext %0, i32 zeroext %1) {
138 ; CHECK-LABEL: br_cc_u32_var:
140 ; CHECK-NEXT: brne.w %s0, %s1, .LBB{{[0-9]+}}_2
141 ; CHECK-NEXT: # %bb.1:
144 ; CHECK-NEXT: #NO_APP
145 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
146 ; CHECK-NEXT: b.l.t (, %s10)
147 %3 = icmp eq i32 %0, %1
148 br i1 %3, label %4, label %5
151 tail call void asm sideeffect "nop", ""()
158 ; Function Attrs: nounwind
159 define void @br_cc_i64_var(i64 %0, i64 %1) {
160 ; CHECK-LABEL: br_cc_i64_var:
162 ; CHECK-NEXT: brne.l %s0, %s1, .LBB{{[0-9]+}}_2
163 ; CHECK-NEXT: # %bb.1:
166 ; CHECK-NEXT: #NO_APP
167 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
168 ; CHECK-NEXT: b.l.t (, %s10)
169 %3 = icmp eq i64 %0, %1
170 br i1 %3, label %4, label %5
173 tail call void asm sideeffect "nop", ""()
180 ; Function Attrs: nounwind
181 define void @br_cc_u64_var(i64 %0, i64 %1) {
182 ; CHECK-LABEL: br_cc_u64_var:
184 ; CHECK-NEXT: brne.l %s0, %s1, .LBB{{[0-9]+}}_2
185 ; CHECK-NEXT: # %bb.1:
188 ; CHECK-NEXT: #NO_APP
189 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
190 ; CHECK-NEXT: b.l.t (, %s10)
191 %3 = icmp eq i64 %0, %1
192 br i1 %3, label %4, label %5
195 tail call void asm sideeffect "nop", ""()
202 ; Function Attrs: nounwind
203 define void @br_cc_i128_var(i128 %0, i128 %1) {
204 ; CHECK-LABEL: br_cc_i128_var:
206 ; CHECK-NEXT: xor %s1, %s1, %s3
207 ; CHECK-NEXT: xor %s0, %s0, %s2
208 ; CHECK-NEXT: or %s0, %s0, %s1
209 ; CHECK-NEXT: brne.l 0, %s0, .LBB{{[0-9]+}}_2
210 ; CHECK-NEXT: # %bb.1:
213 ; CHECK-NEXT: #NO_APP
214 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
215 ; CHECK-NEXT: b.l.t (, %s10)
216 %3 = icmp eq i128 %0, %1
217 br i1 %3, label %4, label %5
220 tail call void asm sideeffect "nop", ""()
227 ; Function Attrs: nounwind
228 define void @br_cc_u128_var(i128 %0, i128 %1) {
229 ; CHECK-LABEL: br_cc_u128_var:
231 ; CHECK-NEXT: xor %s1, %s1, %s3
232 ; CHECK-NEXT: xor %s0, %s0, %s2
233 ; CHECK-NEXT: or %s0, %s0, %s1
234 ; CHECK-NEXT: brne.l 0, %s0, .LBB{{[0-9]+}}_2
235 ; CHECK-NEXT: # %bb.1:
238 ; CHECK-NEXT: #NO_APP
239 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
240 ; CHECK-NEXT: b.l.t (, %s10)
241 %3 = icmp eq i128 %0, %1
242 br i1 %3, label %4, label %5
245 tail call void asm sideeffect "nop", ""()
252 ; Function Attrs: nounwind
253 define void @br_cc_float_var(float %0, float %1) {
254 ; CHECK-LABEL: br_cc_float_var:
256 ; CHECK-NEXT: brne.s %s0, %s1, .LBB{{[0-9]+}}_2
257 ; CHECK-NEXT: # %bb.1:
260 ; CHECK-NEXT: #NO_APP
261 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
262 ; CHECK-NEXT: b.l.t (, %s10)
263 %3 = fcmp fast oeq float %0, %1
264 br i1 %3, label %4, label %5
267 tail call void asm sideeffect "nop", ""()
274 ; Function Attrs: nounwind
275 define void @br_cc_double_var(double %0, double %1) {
276 ; CHECK-LABEL: br_cc_double_var:
278 ; CHECK-NEXT: brne.d %s0, %s1, .LBB{{[0-9]+}}_2
279 ; CHECK-NEXT: # %bb.1:
282 ; CHECK-NEXT: #NO_APP
283 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
284 ; CHECK-NEXT: b.l.t (, %s10)
285 %3 = fcmp fast oeq double %0, %1
286 br i1 %3, label %4, label %5
289 tail call void asm sideeffect "nop", ""()
296 ; Function Attrs: nounwind
297 define void @br_cc_quad_var(fp128 %0, fp128 %1) {
298 ; CHECK-LABEL: br_cc_quad_var:
300 ; CHECK-NEXT: fcmp.q %s0, %s2, %s0
301 ; CHECK-NEXT: brne.d 0, %s0, .LBB{{[0-9]+}}_2
302 ; CHECK-NEXT: # %bb.1:
305 ; CHECK-NEXT: #NO_APP
306 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
307 ; CHECK-NEXT: b.l.t (, %s10)
308 %3 = fcmp fast oeq fp128 %0, %1
309 br i1 %3, label %4, label %5
312 tail call void asm sideeffect "nop", ""()
319 ; Function Attrs: nounwind
320 define void @br_cc_i1_imm(i1 zeroext %0) {
321 ; CHECK-LABEL: br_cc_i1_imm:
323 ; CHECK-NEXT: brne.w 0, %s0, .LBB{{[0-9]+}}_2
324 ; CHECK-NEXT: # %bb.1:
327 ; CHECK-NEXT: #NO_APP
328 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
329 ; CHECK-NEXT: b.l.t (, %s10)
330 br i1 %0, label %3, label %2
333 tail call void asm sideeffect "nop", ""()
340 ; Function Attrs: nounwind
341 define void @br_cc_i8_imm(i8 signext %0) {
342 ; CHECK-LABEL: br_cc_i8_imm:
344 ; CHECK-NEXT: brlt.w -10, %s0, .LBB{{[0-9]+}}_2
345 ; CHECK-NEXT: # %bb.1:
348 ; CHECK-NEXT: #NO_APP
349 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
350 ; CHECK-NEXT: b.l.t (, %s10)
351 %2 = icmp slt i8 %0, -9
352 br i1 %2, label %3, label %4
355 tail call void asm sideeffect "nop", ""()
362 ; Function Attrs: nounwind
363 define void @br_cc_u8_imm(i8 zeroext %0) {
364 ; CHECK-LABEL: br_cc_u8_imm:
366 ; CHECK-NEXT: cmpu.w %s0, 8, %s0
367 ; CHECK-NEXT: brgt.w 0, %s0, .LBB{{[0-9]+}}_2
368 ; CHECK-NEXT: # %bb.1:
371 ; CHECK-NEXT: #NO_APP
372 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
373 ; CHECK-NEXT: b.l.t (, %s10)
374 %2 = icmp ult i8 %0, 9
375 br i1 %2, label %3, label %4
378 tail call void asm sideeffect "nop", ""()
385 ; Function Attrs: nounwind
386 define void @br_cc_i16_imm(i16 signext %0) {
387 ; CHECK-LABEL: br_cc_i16_imm:
389 ; CHECK-NEXT: brlt.w 62, %s0, .LBB{{[0-9]+}}_2
390 ; CHECK-NEXT: # %bb.1:
393 ; CHECK-NEXT: #NO_APP
394 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
395 ; CHECK-NEXT: b.l.t (, %s10)
396 %2 = icmp slt i16 %0, 63
397 br i1 %2, label %3, label %4
400 tail call void asm sideeffect "nop", ""()
407 ; Function Attrs: nounwind
408 define void @br_cc_u16_imm(i16 zeroext %0) {
409 ; CHECK-LABEL: br_cc_u16_imm:
411 ; CHECK-NEXT: cmpu.w %s0, 63, %s0
412 ; CHECK-NEXT: brgt.w 0, %s0, .LBB{{[0-9]+}}_2
413 ; CHECK-NEXT: # %bb.1:
416 ; CHECK-NEXT: #NO_APP
417 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
418 ; CHECK-NEXT: b.l.t (, %s10)
419 %2 = icmp ult i16 %0, 64
420 br i1 %2, label %3, label %4
423 tail call void asm sideeffect "nop", ""()
430 ; Function Attrs: nounwind
431 define void @br_cc_i32_imm(i32 signext %0) {
432 ; CHECK-LABEL: br_cc_i32_imm:
434 ; CHECK-NEXT: brlt.w 63, %s0, .LBB{{[0-9]+}}_2
435 ; CHECK-NEXT: # %bb.1:
438 ; CHECK-NEXT: #NO_APP
439 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
440 ; CHECK-NEXT: b.l.t (, %s10)
441 %2 = icmp slt i32 %0, 64
442 br i1 %2, label %3, label %4
445 tail call void asm sideeffect "nop", ""()
452 ; Function Attrs: nounwind
453 define void @br_cc_u32_imm(i32 zeroext %0) {
454 ; CHECK-LABEL: br_cc_u32_imm:
456 ; CHECK-NEXT: cmpu.w %s0, 63, %s0
457 ; CHECK-NEXT: brgt.w 0, %s0, .LBB{{[0-9]+}}_2
458 ; CHECK-NEXT: # %bb.1:
461 ; CHECK-NEXT: #NO_APP
462 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
463 ; CHECK-NEXT: b.l.t (, %s10)
464 %2 = icmp ult i32 %0, 64
465 br i1 %2, label %3, label %4
468 tail call void asm sideeffect "nop", ""()
475 ; Function Attrs: nounwind
476 define void @br_cc_i64_imm(i64 %0) {
477 ; CHECK-LABEL: br_cc_i64_imm:
479 ; CHECK-NEXT: brlt.l 63, %s0, .LBB{{[0-9]+}}_2
480 ; CHECK-NEXT: # %bb.1:
483 ; CHECK-NEXT: #NO_APP
484 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
485 ; CHECK-NEXT: b.l.t (, %s10)
486 %2 = icmp slt i64 %0, 64
487 br i1 %2, label %3, label %4
490 tail call void asm sideeffect "nop", ""()
497 ; Function Attrs: nounwind
498 define void @br_cc_u64_imm(i64 %0) {
499 ; CHECK-LABEL: br_cc_u64_imm:
501 ; CHECK-NEXT: cmpu.l %s0, 63, %s0
502 ; CHECK-NEXT: brgt.l 0, %s0, .LBB{{[0-9]+}}_2
503 ; CHECK-NEXT: # %bb.1:
506 ; CHECK-NEXT: #NO_APP
507 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
508 ; CHECK-NEXT: b.l.t (, %s10)
509 %2 = icmp ult i64 %0, 64
510 br i1 %2, label %3, label %4
513 tail call void asm sideeffect "nop", ""()
520 ; Function Attrs: nounwind
521 define void @br_cc_i128_imm(i128 %0) {
522 ; CHECK-LABEL: br_cc_i128_imm:
524 ; CHECK-NEXT: or %s2, 0, (0)1
525 ; CHECK-NEXT: cmps.l %s1, %s1, (0)1
526 ; CHECK-NEXT: or %s3, 0, (0)1
527 ; CHECK-NEXT: cmov.l.gt %s3, (63)0, %s1
528 ; CHECK-NEXT: cmpu.l %s0, %s0, (58)0
529 ; CHECK-NEXT: cmov.l.gt %s2, (63)0, %s0
530 ; CHECK-NEXT: cmov.l.eq %s3, %s2, %s1
531 ; CHECK-NEXT: brne.w 0, %s3, .LBB{{[0-9]+}}_2
532 ; CHECK-NEXT: # %bb.1:
535 ; CHECK-NEXT: #NO_APP
536 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
537 ; CHECK-NEXT: b.l.t (, %s10)
538 %2 = icmp slt i128 %0, 64
539 br i1 %2, label %3, label %4
542 tail call void asm sideeffect "nop", ""()
549 ; Function Attrs: nounwind
550 define void @br_cc_u128_imm(i128 %0) {
551 ; CHECK-LABEL: br_cc_u128_imm:
553 ; CHECK-NEXT: or %s2, 0, (0)1
554 ; CHECK-NEXT: cmps.l %s1, %s1, (0)1
555 ; CHECK-NEXT: or %s3, 0, (0)1
556 ; CHECK-NEXT: cmov.l.ne %s3, (63)0, %s1
557 ; CHECK-NEXT: cmpu.l %s0, %s0, (58)0
558 ; CHECK-NEXT: cmov.l.gt %s2, (63)0, %s0
559 ; CHECK-NEXT: cmov.l.eq %s3, %s2, %s1
560 ; CHECK-NEXT: brne.w 0, %s3, .LBB{{[0-9]+}}_2
561 ; CHECK-NEXT: # %bb.1:
564 ; CHECK-NEXT: #NO_APP
565 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
566 ; CHECK-NEXT: b.l.t (, %s10)
567 %2 = icmp ult i128 %0, 64
568 br i1 %2, label %3, label %4
571 tail call void asm sideeffect "nop", ""()
578 ; Function Attrs: nounwind
579 define void @br_cc_float_imm(float %0) {
580 ; CHECK-LABEL: br_cc_float_imm:
582 ; CHECK-NEXT: brle.s 0, %s0, .LBB{{[0-9]+}}_2
583 ; CHECK-NEXT: # %bb.1:
586 ; CHECK-NEXT: #NO_APP
587 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
588 ; CHECK-NEXT: b.l.t (, %s10)
589 %2 = fcmp fast olt float %0, 0.000000e+00
590 br i1 %2, label %3, label %4
593 tail call void asm sideeffect "nop", ""()
600 ; Function Attrs: nounwind
601 define void @br_cc_double_imm(double %0) {
602 ; CHECK-LABEL: br_cc_double_imm:
604 ; CHECK-NEXT: brle.d 0, %s0, .LBB{{[0-9]+}}_2
605 ; CHECK-NEXT: # %bb.1:
608 ; CHECK-NEXT: #NO_APP
609 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
610 ; CHECK-NEXT: b.l.t (, %s10)
611 %2 = fcmp fast olt double %0, 0.000000e+00
612 br i1 %2, label %3, label %4
615 tail call void asm sideeffect "nop", ""()
622 ; Function Attrs: nounwind
623 define void @br_cc_quad_imm(fp128 %0) {
624 ; CHECK-LABEL: br_cc_quad_imm:
626 ; CHECK-NEXT: lea %s2, .LCPI{{[0-9]+}}_0@lo
627 ; CHECK-NEXT: and %s2, %s2, (32)0
628 ; CHECK-NEXT: lea.sl %s2, .LCPI{{[0-9]+}}_0@hi(, %s2)
629 ; CHECK-NEXT: ld %s4, 8(, %s2)
630 ; CHECK-NEXT: ld %s5, (, %s2)
631 ; CHECK-NEXT: fcmp.q %s0, %s4, %s0
632 ; CHECK-NEXT: brge.d 0, %s0, .LBB{{[0-9]+}}_2
633 ; CHECK-NEXT: # %bb.1:
636 ; CHECK-NEXT: #NO_APP
637 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
638 ; CHECK-NEXT: b.l.t (, %s10)
639 %2 = fcmp fast olt fp128 %0, 0xL00000000000000000000000000000000
640 br i1 %2, label %3, label %4
643 tail call void asm sideeffect "nop", ""()
650 ; Function Attrs: nounwind
651 define void @br_cc_imm_i1(i1 zeroext %0) {
652 ; CHECK-LABEL: br_cc_imm_i1:
654 ; CHECK-NEXT: breq.w 0, %s0, .LBB{{[0-9]+}}_2
655 ; CHECK-NEXT: # %bb.1:
658 ; CHECK-NEXT: #NO_APP
659 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
660 ; CHECK-NEXT: b.l.t (, %s10)
661 br i1 %0, label %2, label %3
664 tail call void asm sideeffect "nop", ""()
671 ; Function Attrs: nounwind
672 define void @br_cc_imm_i8(i8 signext %0) {
673 ; CHECK-LABEL: br_cc_imm_i8:
675 ; CHECK-NEXT: brgt.w -9, %s0, .LBB{{[0-9]+}}_2
676 ; CHECK-NEXT: # %bb.1:
679 ; CHECK-NEXT: #NO_APP
680 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
681 ; CHECK-NEXT: b.l.t (, %s10)
682 %2 = icmp sgt i8 %0, -10
683 br i1 %2, label %3, label %4
686 tail call void asm sideeffect "nop", ""()
693 ; Function Attrs: nounwind
694 define void @br_cc_imm_u8(i8 zeroext %0) {
695 ; CHECK-LABEL: br_cc_imm_u8:
697 ; CHECK-NEXT: cmpu.w %s0, 9, %s0
698 ; CHECK-NEXT: brlt.w 0, %s0, .LBB{{[0-9]+}}_2
699 ; CHECK-NEXT: # %bb.1:
702 ; CHECK-NEXT: #NO_APP
703 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
704 ; CHECK-NEXT: b.l.t (, %s10)
705 %2 = icmp ugt i8 %0, 8
706 br i1 %2, label %3, label %4
709 tail call void asm sideeffect "nop", ""()
716 ; Function Attrs: nounwind
717 define void @br_cc_imm_i16(i16 signext %0) {
718 ; CHECK-LABEL: br_cc_imm_i16:
720 ; CHECK-NEXT: brgt.w 63, %s0, .LBB{{[0-9]+}}_2
721 ; CHECK-NEXT: # %bb.1:
724 ; CHECK-NEXT: #NO_APP
725 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
726 ; CHECK-NEXT: b.l.t (, %s10)
727 %2 = icmp sgt i16 %0, 62
728 br i1 %2, label %3, label %4
731 tail call void asm sideeffect "nop", ""()
738 ; Function Attrs: nounwind
739 define void @br_cc_imm_u16(i16 zeroext %0) {
740 ; CHECK-LABEL: br_cc_imm_u16:
742 ; CHECK-NEXT: lea %s1, 64
743 ; CHECK-NEXT: cmpu.w %s0, %s1, %s0
744 ; CHECK-NEXT: brlt.w 0, %s0, .LBB{{[0-9]+}}_2
745 ; CHECK-NEXT: # %bb.1:
748 ; CHECK-NEXT: #NO_APP
749 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
750 ; CHECK-NEXT: b.l.t (, %s10)
751 %2 = icmp ugt i16 %0, 63
752 br i1 %2, label %3, label %4
755 tail call void asm sideeffect "nop", ""()
762 ; Function Attrs: nounwind
763 define void @br_cc_imm_i32(i32 signext %0) {
764 ; CHECK-LABEL: br_cc_imm_i32:
766 ; CHECK-NEXT: brgt.w -64, %s0, .LBB{{[0-9]+}}_2
767 ; CHECK-NEXT: # %bb.1:
770 ; CHECK-NEXT: #NO_APP
771 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
772 ; CHECK-NEXT: b.l.t (, %s10)
773 %2 = icmp sgt i32 %0, -65
774 br i1 %2, label %3, label %4
777 tail call void asm sideeffect "nop", ""()
784 ; Function Attrs: nounwind
785 define void @br_cc_imm_u32(i32 zeroext %0) {
786 ; CHECK-LABEL: br_cc_imm_u32:
788 ; CHECK-NEXT: cmpu.w %s0, -64, %s0
789 ; CHECK-NEXT: brlt.w 0, %s0, .LBB{{[0-9]+}}_2
790 ; CHECK-NEXT: # %bb.1:
793 ; CHECK-NEXT: #NO_APP
794 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
795 ; CHECK-NEXT: b.l.t (, %s10)
796 %2 = icmp ugt i32 %0, -65
797 br i1 %2, label %3, label %4
800 tail call void asm sideeffect "nop", ""()
807 ; Function Attrs: nounwind
808 define void @br_cc_imm_i64(i64 %0) {
809 ; CHECK-LABEL: br_cc_imm_i64:
811 ; CHECK-NEXT: brgt.l -64, %s0, .LBB{{[0-9]+}}_2
812 ; CHECK-NEXT: # %bb.1:
815 ; CHECK-NEXT: #NO_APP
816 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
817 ; CHECK-NEXT: b.l.t (, %s10)
818 %2 = icmp sgt i64 %0, -65
819 br i1 %2, label %3, label %4
822 tail call void asm sideeffect "nop", ""()
829 ; Function Attrs: nounwind
830 define void @br_cc_imm_u64(i64 %0) {
831 ; CHECK-LABEL: br_cc_imm_u64:
833 ; CHECK-NEXT: cmpu.l %s0, -64, %s0
834 ; CHECK-NEXT: brlt.l 0, %s0, .LBB{{[0-9]+}}_2
835 ; CHECK-NEXT: # %bb.1:
838 ; CHECK-NEXT: #NO_APP
839 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
840 ; CHECK-NEXT: b.l.t (, %s10)
841 %2 = icmp ugt i64 %0, -65
842 br i1 %2, label %3, label %4
845 tail call void asm sideeffect "nop", ""()
852 ; Function Attrs: nounwind
853 define void @br_cc_imm_i128(i128 %0) {
854 ; CHECK-LABEL: br_cc_imm_i128:
856 ; CHECK-NEXT: cmps.l %s1, %s1, (0)0
857 ; CHECK-NEXT: or %s2, 0, (0)1
858 ; CHECK-NEXT: or %s3, 0, (0)1
859 ; CHECK-NEXT: cmov.l.lt %s3, (63)0, %s1
860 ; CHECK-NEXT: cmpu.l %s0, %s0, (58)1
861 ; CHECK-NEXT: cmov.l.lt %s2, (63)0, %s0
862 ; CHECK-NEXT: cmov.l.eq %s3, %s2, %s1
863 ; CHECK-NEXT: brne.w 0, %s3, .LBB{{[0-9]+}}_2
864 ; CHECK-NEXT: # %bb.1:
867 ; CHECK-NEXT: #NO_APP
868 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
869 ; CHECK-NEXT: b.l.t (, %s10)
870 %2 = icmp sgt i128 %0, -65
871 br i1 %2, label %3, label %4
874 tail call void asm sideeffect "nop", ""()
881 ; Function Attrs: nounwind
882 define void @br_cc_imm_u128(i128 %0) {
883 ; CHECK-LABEL: br_cc_imm_u128:
885 ; CHECK-NEXT: cmps.l %s1, %s1, (0)0
886 ; CHECK-NEXT: or %s2, 0, (0)1
887 ; CHECK-NEXT: or %s3, 0, (0)1
888 ; CHECK-NEXT: cmov.l.ne %s3, (63)0, %s1
889 ; CHECK-NEXT: cmpu.l %s0, %s0, (58)1
890 ; CHECK-NEXT: cmov.l.lt %s2, (63)0, %s0
891 ; CHECK-NEXT: cmov.l.eq %s3, %s2, %s1
892 ; CHECK-NEXT: brne.w 0, %s3, .LBB{{[0-9]+}}_2
893 ; CHECK-NEXT: # %bb.1:
896 ; CHECK-NEXT: #NO_APP
897 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
898 ; CHECK-NEXT: b.l.t (, %s10)
899 %2 = icmp ugt i128 %0, -65
900 br i1 %2, label %3, label %4
903 tail call void asm sideeffect "nop", ""()
910 ; Function Attrs: nounwind
911 define void @br_cc_imm_float(float %0) {
912 ; CHECK-LABEL: br_cc_imm_float:
914 ; CHECK-NEXT: brgt.s 0, %s0, .LBB{{[0-9]+}}_2
915 ; CHECK-NEXT: # %bb.1:
918 ; CHECK-NEXT: #NO_APP
919 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
920 ; CHECK-NEXT: b.l.t (, %s10)
921 %2 = fcmp fast ult float %0, 0.000000e+00
922 br i1 %2, label %4, label %3
925 tail call void asm sideeffect "nop", ""()
932 ; Function Attrs: nounwind
933 define void @br_cc_imm_double(double %0) {
934 ; CHECK-LABEL: br_cc_imm_double:
936 ; CHECK-NEXT: brgt.d 0, %s0, .LBB{{[0-9]+}}_2
937 ; CHECK-NEXT: # %bb.1:
940 ; CHECK-NEXT: #NO_APP
941 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
942 ; CHECK-NEXT: b.l.t (, %s10)
943 %2 = fcmp fast ult double %0, 0.000000e+00
944 br i1 %2, label %4, label %3
947 tail call void asm sideeffect "nop", ""()
954 ; Function Attrs: nounwind
955 define void @br_cc_imm_quad(fp128 %0) {
956 ; CHECK-LABEL: br_cc_imm_quad:
958 ; CHECK-NEXT: lea %s2, .LCPI{{[0-9]+}}_0@lo
959 ; CHECK-NEXT: and %s2, %s2, (32)0
960 ; CHECK-NEXT: lea.sl %s2, .LCPI{{[0-9]+}}_0@hi(, %s2)
961 ; CHECK-NEXT: ld %s4, 8(, %s2)
962 ; CHECK-NEXT: ld %s5, (, %s2)
963 ; CHECK-NEXT: fcmp.q %s0, %s4, %s0
964 ; CHECK-NEXT: brlt.d 0, %s0, .LBB{{[0-9]+}}_2
965 ; CHECK-NEXT: # %bb.1:
968 ; CHECK-NEXT: #NO_APP
969 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
970 ; CHECK-NEXT: b.l.t (, %s10)
971 %2 = fcmp fast ult fp128 %0, 0xL00000000000000000000000000000000
972 br i1 %2, label %4, label %3
975 tail call void asm sideeffect "nop", ""()