1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
4 define i1 @lshrugt_01_00(i4 %x) {
5 ; CHECK-LABEL: @lshrugt_01_00(
6 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 1
7 ; CHECK-NEXT: ret i1 [[C]]
10 %c = icmp ugt i4 %s, 0
14 define i1 @lshrugt_01_01(i4 %x) {
15 ; CHECK-LABEL: @lshrugt_01_01(
16 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 3
17 ; CHECK-NEXT: ret i1 [[C]]
20 %c = icmp ugt i4 %s, 1
24 define i1 @lshrugt_01_02(i4 %x) {
25 ; CHECK-LABEL: @lshrugt_01_02(
26 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 5
27 ; CHECK-NEXT: ret i1 [[C]]
30 %c = icmp ugt i4 %s, 2
34 define i1 @lshrugt_01_03(i4 %x) {
35 ; CHECK-LABEL: @lshrugt_01_03(
36 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
37 ; CHECK-NEXT: ret i1 [[C]]
40 %c = icmp ugt i4 %s, 3
44 define i1 @lshrugt_01_04(i4 %x) {
45 ; CHECK-LABEL: @lshrugt_01_04(
46 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], -7
47 ; CHECK-NEXT: ret i1 [[C]]
50 %c = icmp ugt i4 %s, 4
54 define i1 @lshrugt_01_05(i4 %x) {
55 ; CHECK-LABEL: @lshrugt_01_05(
56 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], -5
57 ; CHECK-NEXT: ret i1 [[C]]
60 %c = icmp ugt i4 %s, 5
64 define i1 @lshrugt_01_06(i4 %x) {
65 ; CHECK-LABEL: @lshrugt_01_06(
66 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], -3
67 ; CHECK-NEXT: ret i1 [[C]]
70 %c = icmp ugt i4 %s, 6
74 define i1 @lshrugt_01_07(i4 %x) {
75 ; CHECK-LABEL: @lshrugt_01_07(
76 ; CHECK-NEXT: ret i1 false
79 %c = icmp ugt i4 %s, 7
83 define i1 @lshrugt_01_08(i4 %x) {
84 ; CHECK-LABEL: @lshrugt_01_08(
85 ; CHECK-NEXT: ret i1 false
88 %c = icmp ugt i4 %s, 8
92 define i1 @lshrugt_01_09(i4 %x) {
93 ; CHECK-LABEL: @lshrugt_01_09(
94 ; CHECK-NEXT: ret i1 false
97 %c = icmp ugt i4 %s, 9
101 define i1 @lshrugt_01_10(i4 %x) {
102 ; CHECK-LABEL: @lshrugt_01_10(
103 ; CHECK-NEXT: ret i1 false
106 %c = icmp ugt i4 %s, 10
110 define i1 @lshrugt_01_11(i4 %x) {
111 ; CHECK-LABEL: @lshrugt_01_11(
112 ; CHECK-NEXT: ret i1 false
115 %c = icmp ugt i4 %s, 11
119 define i1 @lshrugt_01_12(i4 %x) {
120 ; CHECK-LABEL: @lshrugt_01_12(
121 ; CHECK-NEXT: ret i1 false
124 %c = icmp ugt i4 %s, 12
128 define i1 @lshrugt_01_13(i4 %x) {
129 ; CHECK-LABEL: @lshrugt_01_13(
130 ; CHECK-NEXT: ret i1 false
133 %c = icmp ugt i4 %s, 13
137 define i1 @lshrugt_01_14(i4 %x) {
138 ; CHECK-LABEL: @lshrugt_01_14(
139 ; CHECK-NEXT: ret i1 false
142 %c = icmp ugt i4 %s, 14
146 define i1 @lshrugt_01_15(i4 %x) {
147 ; CHECK-LABEL: @lshrugt_01_15(
148 ; CHECK-NEXT: ret i1 false
151 %c = icmp ugt i4 %s, 15
155 define i1 @lshrugt_02_00(i4 %x) {
156 ; CHECK-LABEL: @lshrugt_02_00(
157 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 3
158 ; CHECK-NEXT: ret i1 [[C]]
161 %c = icmp ugt i4 %s, 0
165 define i1 @lshrugt_02_01(i4 %x) {
166 ; CHECK-LABEL: @lshrugt_02_01(
167 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
168 ; CHECK-NEXT: ret i1 [[C]]
171 %c = icmp ugt i4 %s, 1
175 define i1 @lshrugt_02_02(i4 %x) {
176 ; CHECK-LABEL: @lshrugt_02_02(
177 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], -5
178 ; CHECK-NEXT: ret i1 [[C]]
181 %c = icmp ugt i4 %s, 2
185 define i1 @lshrugt_02_03(i4 %x) {
186 ; CHECK-LABEL: @lshrugt_02_03(
187 ; CHECK-NEXT: ret i1 false
190 %c = icmp ugt i4 %s, 3
194 define i1 @lshrugt_02_04(i4 %x) {
195 ; CHECK-LABEL: @lshrugt_02_04(
196 ; CHECK-NEXT: ret i1 false
199 %c = icmp ugt i4 %s, 4
203 define i1 @lshrugt_02_05(i4 %x) {
204 ; CHECK-LABEL: @lshrugt_02_05(
205 ; CHECK-NEXT: ret i1 false
208 %c = icmp ugt i4 %s, 5
212 define i1 @lshrugt_02_06(i4 %x) {
213 ; CHECK-LABEL: @lshrugt_02_06(
214 ; CHECK-NEXT: ret i1 false
217 %c = icmp ugt i4 %s, 6
221 define i1 @lshrugt_02_07(i4 %x) {
222 ; CHECK-LABEL: @lshrugt_02_07(
223 ; CHECK-NEXT: ret i1 false
226 %c = icmp ugt i4 %s, 7
230 define i1 @lshrugt_02_08(i4 %x) {
231 ; CHECK-LABEL: @lshrugt_02_08(
232 ; CHECK-NEXT: ret i1 false
235 %c = icmp ugt i4 %s, 8
239 define i1 @lshrugt_02_09(i4 %x) {
240 ; CHECK-LABEL: @lshrugt_02_09(
241 ; CHECK-NEXT: ret i1 false
244 %c = icmp ugt i4 %s, 9
248 define i1 @lshrugt_02_10(i4 %x) {
249 ; CHECK-LABEL: @lshrugt_02_10(
250 ; CHECK-NEXT: ret i1 false
253 %c = icmp ugt i4 %s, 10
257 define i1 @lshrugt_02_11(i4 %x) {
258 ; CHECK-LABEL: @lshrugt_02_11(
259 ; CHECK-NEXT: ret i1 false
262 %c = icmp ugt i4 %s, 11
266 define i1 @lshrugt_02_12(i4 %x) {
267 ; CHECK-LABEL: @lshrugt_02_12(
268 ; CHECK-NEXT: ret i1 false
271 %c = icmp ugt i4 %s, 12
275 define i1 @lshrugt_02_13(i4 %x) {
276 ; CHECK-LABEL: @lshrugt_02_13(
277 ; CHECK-NEXT: ret i1 false
280 %c = icmp ugt i4 %s, 13
284 define i1 @lshrugt_02_14(i4 %x) {
285 ; CHECK-LABEL: @lshrugt_02_14(
286 ; CHECK-NEXT: ret i1 false
289 %c = icmp ugt i4 %s, 14
293 define i1 @lshrugt_02_15(i4 %x) {
294 ; CHECK-LABEL: @lshrugt_02_15(
295 ; CHECK-NEXT: ret i1 false
298 %c = icmp ugt i4 %s, 15
302 define i1 @lshrugt_03_00(i4 %x) {
303 ; CHECK-LABEL: @lshrugt_03_00(
304 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
305 ; CHECK-NEXT: ret i1 [[C]]
308 %c = icmp ugt i4 %s, 0
312 define i1 @lshrugt_03_01(i4 %x) {
313 ; CHECK-LABEL: @lshrugt_03_01(
314 ; CHECK-NEXT: ret i1 false
317 %c = icmp ugt i4 %s, 1
321 define i1 @lshrugt_03_02(i4 %x) {
322 ; CHECK-LABEL: @lshrugt_03_02(
323 ; CHECK-NEXT: ret i1 false
326 %c = icmp ugt i4 %s, 2
330 define i1 @lshrugt_03_03(i4 %x) {
331 ; CHECK-LABEL: @lshrugt_03_03(
332 ; CHECK-NEXT: ret i1 false
335 %c = icmp ugt i4 %s, 3
339 define i1 @lshrugt_03_04(i4 %x) {
340 ; CHECK-LABEL: @lshrugt_03_04(
341 ; CHECK-NEXT: ret i1 false
344 %c = icmp ugt i4 %s, 4
348 define i1 @lshrugt_03_05(i4 %x) {
349 ; CHECK-LABEL: @lshrugt_03_05(
350 ; CHECK-NEXT: ret i1 false
353 %c = icmp ugt i4 %s, 5
357 define i1 @lshrugt_03_06(i4 %x) {
358 ; CHECK-LABEL: @lshrugt_03_06(
359 ; CHECK-NEXT: ret i1 false
362 %c = icmp ugt i4 %s, 6
366 define i1 @lshrugt_03_07(i4 %x) {
367 ; CHECK-LABEL: @lshrugt_03_07(
368 ; CHECK-NEXT: ret i1 false
371 %c = icmp ugt i4 %s, 7
375 define i1 @lshrugt_03_08(i4 %x) {
376 ; CHECK-LABEL: @lshrugt_03_08(
377 ; CHECK-NEXT: ret i1 false
380 %c = icmp ugt i4 %s, 8
384 define i1 @lshrugt_03_09(i4 %x) {
385 ; CHECK-LABEL: @lshrugt_03_09(
386 ; CHECK-NEXT: ret i1 false
389 %c = icmp ugt i4 %s, 9
393 define i1 @lshrugt_03_10(i4 %x) {
394 ; CHECK-LABEL: @lshrugt_03_10(
395 ; CHECK-NEXT: ret i1 false
398 %c = icmp ugt i4 %s, 10
402 define i1 @lshrugt_03_11(i4 %x) {
403 ; CHECK-LABEL: @lshrugt_03_11(
404 ; CHECK-NEXT: ret i1 false
407 %c = icmp ugt i4 %s, 11
411 define i1 @lshrugt_03_12(i4 %x) {
412 ; CHECK-LABEL: @lshrugt_03_12(
413 ; CHECK-NEXT: ret i1 false
416 %c = icmp ugt i4 %s, 12
420 define i1 @lshrugt_03_13(i4 %x) {
421 ; CHECK-LABEL: @lshrugt_03_13(
422 ; CHECK-NEXT: ret i1 false
425 %c = icmp ugt i4 %s, 13
429 define i1 @lshrugt_03_14(i4 %x) {
430 ; CHECK-LABEL: @lshrugt_03_14(
431 ; CHECK-NEXT: ret i1 false
434 %c = icmp ugt i4 %s, 14
438 define i1 @lshrugt_03_15(i4 %x) {
439 ; CHECK-LABEL: @lshrugt_03_15(
440 ; CHECK-NEXT: ret i1 false
443 %c = icmp ugt i4 %s, 15
447 define i1 @lshrult_01_00(i4 %x) {
448 ; CHECK-LABEL: @lshrult_01_00(
449 ; CHECK-NEXT: ret i1 false
452 %c = icmp ult i4 %s, 0
456 define i1 @lshrult_01_01(i4 %x) {
457 ; CHECK-LABEL: @lshrult_01_01(
458 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], 2
459 ; CHECK-NEXT: ret i1 [[C]]
462 %c = icmp ult i4 %s, 1
466 define i1 @lshrult_01_02(i4 %x) {
467 ; CHECK-LABEL: @lshrult_01_02(
468 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], 4
469 ; CHECK-NEXT: ret i1 [[C]]
472 %c = icmp ult i4 %s, 2
476 define i1 @lshrult_01_03(i4 %x) {
477 ; CHECK-LABEL: @lshrult_01_03(
478 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], 6
479 ; CHECK-NEXT: ret i1 [[C]]
482 %c = icmp ult i4 %s, 3
486 define i1 @lshrult_01_04(i4 %x) {
487 ; CHECK-LABEL: @lshrult_01_04(
488 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
489 ; CHECK-NEXT: ret i1 [[C]]
492 %c = icmp ult i4 %s, 4
496 define i1 @lshrult_01_05(i4 %x) {
497 ; CHECK-LABEL: @lshrult_01_05(
498 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], -6
499 ; CHECK-NEXT: ret i1 [[C]]
502 %c = icmp ult i4 %s, 5
506 define i1 @lshrult_01_06(i4 %x) {
507 ; CHECK-LABEL: @lshrult_01_06(
508 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], -4
509 ; CHECK-NEXT: ret i1 [[C]]
512 %c = icmp ult i4 %s, 6
516 define i1 @lshrult_01_07(i4 %x) {
517 ; CHECK-LABEL: @lshrult_01_07(
518 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], -2
519 ; CHECK-NEXT: ret i1 [[C]]
522 %c = icmp ult i4 %s, 7
526 define i1 @lshrult_01_08(i4 %x) {
527 ; CHECK-LABEL: @lshrult_01_08(
528 ; CHECK-NEXT: ret i1 true
531 %c = icmp ult i4 %s, 8
535 define i1 @lshrult_01_09(i4 %x) {
536 ; CHECK-LABEL: @lshrult_01_09(
537 ; CHECK-NEXT: ret i1 true
540 %c = icmp ult i4 %s, 9
544 define i1 @lshrult_01_10(i4 %x) {
545 ; CHECK-LABEL: @lshrult_01_10(
546 ; CHECK-NEXT: ret i1 true
549 %c = icmp ult i4 %s, 10
553 define i1 @lshrult_01_11(i4 %x) {
554 ; CHECK-LABEL: @lshrult_01_11(
555 ; CHECK-NEXT: ret i1 true
558 %c = icmp ult i4 %s, 11
562 define i1 @lshrult_01_12(i4 %x) {
563 ; CHECK-LABEL: @lshrult_01_12(
564 ; CHECK-NEXT: ret i1 true
567 %c = icmp ult i4 %s, 12
571 define i1 @lshrult_01_13(i4 %x) {
572 ; CHECK-LABEL: @lshrult_01_13(
573 ; CHECK-NEXT: ret i1 true
576 %c = icmp ult i4 %s, 13
580 define i1 @lshrult_01_14(i4 %x) {
581 ; CHECK-LABEL: @lshrult_01_14(
582 ; CHECK-NEXT: ret i1 true
585 %c = icmp ult i4 %s, 14
589 define i1 @lshrult_01_15(i4 %x) {
590 ; CHECK-LABEL: @lshrult_01_15(
591 ; CHECK-NEXT: ret i1 true
594 %c = icmp ult i4 %s, 15
598 define i1 @lshrult_02_00(i4 %x) {
599 ; CHECK-LABEL: @lshrult_02_00(
600 ; CHECK-NEXT: ret i1 false
603 %c = icmp ult i4 %s, 0
607 define i1 @lshrult_02_01(i4 %x) {
608 ; CHECK-LABEL: @lshrult_02_01(
609 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], 4
610 ; CHECK-NEXT: ret i1 [[C]]
613 %c = icmp ult i4 %s, 1
617 define i1 @lshrult_02_02(i4 %x) {
618 ; CHECK-LABEL: @lshrult_02_02(
619 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
620 ; CHECK-NEXT: ret i1 [[C]]
623 %c = icmp ult i4 %s, 2
627 define i1 @lshrult_02_03(i4 %x) {
628 ; CHECK-LABEL: @lshrult_02_03(
629 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], -4
630 ; CHECK-NEXT: ret i1 [[C]]
633 %c = icmp ult i4 %s, 3
637 define i1 @lshrult_02_04(i4 %x) {
638 ; CHECK-LABEL: @lshrult_02_04(
639 ; CHECK-NEXT: ret i1 true
642 %c = icmp ult i4 %s, 4
646 define i1 @lshrult_02_05(i4 %x) {
647 ; CHECK-LABEL: @lshrult_02_05(
648 ; CHECK-NEXT: ret i1 true
651 %c = icmp ult i4 %s, 5
655 define i1 @lshrult_02_06(i4 %x) {
656 ; CHECK-LABEL: @lshrult_02_06(
657 ; CHECK-NEXT: ret i1 true
660 %c = icmp ult i4 %s, 6
664 define i1 @lshrult_02_07(i4 %x) {
665 ; CHECK-LABEL: @lshrult_02_07(
666 ; CHECK-NEXT: ret i1 true
669 %c = icmp ult i4 %s, 7
673 define i1 @lshrult_02_08(i4 %x) {
674 ; CHECK-LABEL: @lshrult_02_08(
675 ; CHECK-NEXT: ret i1 true
678 %c = icmp ult i4 %s, 8
682 define i1 @lshrult_02_09(i4 %x) {
683 ; CHECK-LABEL: @lshrult_02_09(
684 ; CHECK-NEXT: ret i1 true
687 %c = icmp ult i4 %s, 9
691 define i1 @lshrult_02_10(i4 %x) {
692 ; CHECK-LABEL: @lshrult_02_10(
693 ; CHECK-NEXT: ret i1 true
696 %c = icmp ult i4 %s, 10
700 define i1 @lshrult_02_11(i4 %x) {
701 ; CHECK-LABEL: @lshrult_02_11(
702 ; CHECK-NEXT: ret i1 true
705 %c = icmp ult i4 %s, 11
709 define i1 @lshrult_02_12(i4 %x) {
710 ; CHECK-LABEL: @lshrult_02_12(
711 ; CHECK-NEXT: ret i1 true
714 %c = icmp ult i4 %s, 12
718 define i1 @lshrult_02_13(i4 %x) {
719 ; CHECK-LABEL: @lshrult_02_13(
720 ; CHECK-NEXT: ret i1 true
723 %c = icmp ult i4 %s, 13
727 define i1 @lshrult_02_14(i4 %x) {
728 ; CHECK-LABEL: @lshrult_02_14(
729 ; CHECK-NEXT: ret i1 true
732 %c = icmp ult i4 %s, 14
736 define i1 @lshrult_02_15(i4 %x) {
737 ; CHECK-LABEL: @lshrult_02_15(
738 ; CHECK-NEXT: ret i1 true
741 %c = icmp ult i4 %s, 15
745 define i1 @lshrult_03_00(i4 %x) {
746 ; CHECK-LABEL: @lshrult_03_00(
747 ; CHECK-NEXT: ret i1 false
750 %c = icmp ult i4 %s, 0
754 define i1 @lshrult_03_01(i4 %x) {
755 ; CHECK-LABEL: @lshrult_03_01(
756 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
757 ; CHECK-NEXT: ret i1 [[C]]
760 %c = icmp ult i4 %s, 1
764 define i1 @lshrult_03_02(i4 %x) {
765 ; CHECK-LABEL: @lshrult_03_02(
766 ; CHECK-NEXT: ret i1 true
769 %c = icmp ult i4 %s, 2
773 define i1 @lshrult_03_03(i4 %x) {
774 ; CHECK-LABEL: @lshrult_03_03(
775 ; CHECK-NEXT: ret i1 true
778 %c = icmp ult i4 %s, 3
782 define i1 @lshrult_03_04(i4 %x) {
783 ; CHECK-LABEL: @lshrult_03_04(
784 ; CHECK-NEXT: ret i1 true
787 %c = icmp ult i4 %s, 4
791 define i1 @lshrult_03_05(i4 %x) {
792 ; CHECK-LABEL: @lshrult_03_05(
793 ; CHECK-NEXT: ret i1 true
796 %c = icmp ult i4 %s, 5
800 define i1 @lshrult_03_06(i4 %x) {
801 ; CHECK-LABEL: @lshrult_03_06(
802 ; CHECK-NEXT: ret i1 true
805 %c = icmp ult i4 %s, 6
809 define i1 @lshrult_03_07(i4 %x) {
810 ; CHECK-LABEL: @lshrult_03_07(
811 ; CHECK-NEXT: ret i1 true
814 %c = icmp ult i4 %s, 7
818 define i1 @lshrult_03_08(i4 %x) {
819 ; CHECK-LABEL: @lshrult_03_08(
820 ; CHECK-NEXT: ret i1 true
823 %c = icmp ult i4 %s, 8
827 define i1 @lshrult_03_09(i4 %x) {
828 ; CHECK-LABEL: @lshrult_03_09(
829 ; CHECK-NEXT: ret i1 true
832 %c = icmp ult i4 %s, 9
836 define i1 @lshrult_03_10(i4 %x) {
837 ; CHECK-LABEL: @lshrult_03_10(
838 ; CHECK-NEXT: ret i1 true
841 %c = icmp ult i4 %s, 10
845 define i1 @lshrult_03_11(i4 %x) {
846 ; CHECK-LABEL: @lshrult_03_11(
847 ; CHECK-NEXT: ret i1 true
850 %c = icmp ult i4 %s, 11
854 define i1 @lshrult_03_12(i4 %x) {
855 ; CHECK-LABEL: @lshrult_03_12(
856 ; CHECK-NEXT: ret i1 true
859 %c = icmp ult i4 %s, 12
863 define i1 @lshrult_03_13(i4 %x) {
864 ; CHECK-LABEL: @lshrult_03_13(
865 ; CHECK-NEXT: ret i1 true
868 %c = icmp ult i4 %s, 13
872 define i1 @lshrult_03_14(i4 %x) {
873 ; CHECK-LABEL: @lshrult_03_14(
874 ; CHECK-NEXT: ret i1 true
877 %c = icmp ult i4 %s, 14
881 define i1 @lshrult_03_15(i4 %x) {
882 ; CHECK-LABEL: @lshrult_03_15(
883 ; CHECK-NEXT: ret i1 true
886 %c = icmp ult i4 %s, 15
890 define i1 @ashrsgt_01_00(i4 %x) {
891 ; CHECK-LABEL: @ashrsgt_01_00(
892 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 1
893 ; CHECK-NEXT: ret i1 [[C]]
896 %c = icmp sgt i4 %s, 0
900 define i1 @ashrsgt_01_01(i4 %x) {
901 ; CHECK-LABEL: @ashrsgt_01_01(
902 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 3
903 ; CHECK-NEXT: ret i1 [[C]]
906 %c = icmp sgt i4 %s, 1
910 define i1 @ashrsgt_01_02(i4 %x) {
911 ; CHECK-LABEL: @ashrsgt_01_02(
912 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 5
913 ; CHECK-NEXT: ret i1 [[C]]
916 %c = icmp sgt i4 %s, 2
920 define i1 @ashrsgt_01_03(i4 %x) {
921 ; CHECK-LABEL: @ashrsgt_01_03(
922 ; CHECK-NEXT: ret i1 false
925 %c = icmp sgt i4 %s, 3
929 define i1 @ashrsgt_01_04(i4 %x) {
930 ; CHECK-LABEL: @ashrsgt_01_04(
931 ; CHECK-NEXT: ret i1 false
934 %c = icmp sgt i4 %s, 4
938 define i1 @ashrsgt_01_05(i4 %x) {
939 ; CHECK-LABEL: @ashrsgt_01_05(
940 ; CHECK-NEXT: ret i1 false
943 %c = icmp sgt i4 %s, 5
947 define i1 @ashrsgt_01_06(i4 %x) {
948 ; CHECK-LABEL: @ashrsgt_01_06(
949 ; CHECK-NEXT: ret i1 false
952 %c = icmp sgt i4 %s, 6
956 define i1 @ashrsgt_01_07(i4 %x) {
957 ; CHECK-LABEL: @ashrsgt_01_07(
958 ; CHECK-NEXT: ret i1 false
961 %c = icmp sgt i4 %s, 7
965 define i1 @ashrsgt_01_08(i4 %x) {
966 ; CHECK-LABEL: @ashrsgt_01_08(
967 ; CHECK-NEXT: ret i1 true
970 %c = icmp sgt i4 %s, 8
974 define i1 @ashrsgt_01_09(i4 %x) {
975 ; CHECK-LABEL: @ashrsgt_01_09(
976 ; CHECK-NEXT: ret i1 true
979 %c = icmp sgt i4 %s, 9
983 define i1 @ashrsgt_01_10(i4 %x) {
984 ; CHECK-LABEL: @ashrsgt_01_10(
985 ; CHECK-NEXT: ret i1 true
988 %c = icmp sgt i4 %s, 10
992 define i1 @ashrsgt_01_11(i4 %x) {
993 ; CHECK-LABEL: @ashrsgt_01_11(
994 ; CHECK-NEXT: ret i1 true
997 %c = icmp sgt i4 %s, 11
1001 define i1 @ashrsgt_01_12(i4 %x) {
1002 ; CHECK-LABEL: @ashrsgt_01_12(
1003 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -7
1004 ; CHECK-NEXT: ret i1 [[C]]
1007 %c = icmp sgt i4 %s, 12
1011 define i1 @ashrsgt_01_13(i4 %x) {
1012 ; CHECK-LABEL: @ashrsgt_01_13(
1013 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -5
1014 ; CHECK-NEXT: ret i1 [[C]]
1017 %c = icmp sgt i4 %s, 13
1021 define i1 @ashrsgt_01_14(i4 %x) {
1022 ; CHECK-LABEL: @ashrsgt_01_14(
1023 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -3
1024 ; CHECK-NEXT: ret i1 [[C]]
1027 %c = icmp sgt i4 %s, 14
1031 define i1 @ashrsgt_01_15(i4 %x) {
1032 ; CHECK-LABEL: @ashrsgt_01_15(
1033 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
1034 ; CHECK-NEXT: ret i1 [[C]]
1037 %c = icmp sgt i4 %s, 15
1041 define i1 @ashrsgt_02_00(i4 %x) {
1042 ; CHECK-LABEL: @ashrsgt_02_00(
1043 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 3
1044 ; CHECK-NEXT: ret i1 [[C]]
1047 %c = icmp sgt i4 %s, 0
1051 define i1 @ashrsgt_02_01(i4 %x) {
1052 ; CHECK-LABEL: @ashrsgt_02_01(
1053 ; CHECK-NEXT: ret i1 false
1056 %c = icmp sgt i4 %s, 1
1060 define i1 @ashrsgt_02_02(i4 %x) {
1061 ; CHECK-LABEL: @ashrsgt_02_02(
1062 ; CHECK-NEXT: ret i1 false
1065 %c = icmp sgt i4 %s, 2
1069 define i1 @ashrsgt_02_03(i4 %x) {
1070 ; CHECK-LABEL: @ashrsgt_02_03(
1071 ; CHECK-NEXT: ret i1 false
1074 %c = icmp sgt i4 %s, 3
1078 define i1 @ashrsgt_02_04(i4 %x) {
1079 ; CHECK-LABEL: @ashrsgt_02_04(
1080 ; CHECK-NEXT: ret i1 false
1083 %c = icmp sgt i4 %s, 4
1087 define i1 @ashrsgt_02_05(i4 %x) {
1088 ; CHECK-LABEL: @ashrsgt_02_05(
1089 ; CHECK-NEXT: ret i1 false
1092 %c = icmp sgt i4 %s, 5
1096 define i1 @ashrsgt_02_06(i4 %x) {
1097 ; CHECK-LABEL: @ashrsgt_02_06(
1098 ; CHECK-NEXT: ret i1 false
1101 %c = icmp sgt i4 %s, 6
1105 define i1 @ashrsgt_02_07(i4 %x) {
1106 ; CHECK-LABEL: @ashrsgt_02_07(
1107 ; CHECK-NEXT: ret i1 false
1110 %c = icmp sgt i4 %s, 7
1114 define i1 @ashrsgt_02_08(i4 %x) {
1115 ; CHECK-LABEL: @ashrsgt_02_08(
1116 ; CHECK-NEXT: ret i1 true
1119 %c = icmp sgt i4 %s, 8
1123 define i1 @ashrsgt_02_09(i4 %x) {
1124 ; CHECK-LABEL: @ashrsgt_02_09(
1125 ; CHECK-NEXT: ret i1 true
1128 %c = icmp sgt i4 %s, 9
1132 define i1 @ashrsgt_02_10(i4 %x) {
1133 ; CHECK-LABEL: @ashrsgt_02_10(
1134 ; CHECK-NEXT: ret i1 true
1137 %c = icmp sgt i4 %s, 10
1141 define i1 @ashrsgt_02_11(i4 %x) {
1142 ; CHECK-LABEL: @ashrsgt_02_11(
1143 ; CHECK-NEXT: ret i1 true
1146 %c = icmp sgt i4 %s, 11
1150 define i1 @ashrsgt_02_12(i4 %x) {
1151 ; CHECK-LABEL: @ashrsgt_02_12(
1152 ; CHECK-NEXT: ret i1 true
1155 %c = icmp sgt i4 %s, 12
1159 define i1 @ashrsgt_02_13(i4 %x) {
1160 ; CHECK-LABEL: @ashrsgt_02_13(
1161 ; CHECK-NEXT: ret i1 true
1164 %c = icmp sgt i4 %s, 13
1168 define i1 @ashrsgt_02_14(i4 %x) {
1169 ; CHECK-LABEL: @ashrsgt_02_14(
1170 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -5
1171 ; CHECK-NEXT: ret i1 [[C]]
1174 %c = icmp sgt i4 %s, 14
1178 define i1 @ashrsgt_02_15(i4 %x) {
1179 ; CHECK-LABEL: @ashrsgt_02_15(
1180 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
1181 ; CHECK-NEXT: ret i1 [[C]]
1184 %c = icmp sgt i4 %s, 15
1188 define i1 @ashrsgt_03_00(i4 %x) {
1189 ; CHECK-LABEL: @ashrsgt_03_00(
1190 ; CHECK-NEXT: ret i1 false
1193 %c = icmp sgt i4 %s, 0
1197 define i1 @ashrsgt_03_01(i4 %x) {
1198 ; CHECK-LABEL: @ashrsgt_03_01(
1199 ; CHECK-NEXT: ret i1 false
1202 %c = icmp sgt i4 %s, 1
1206 define i1 @ashrsgt_03_02(i4 %x) {
1207 ; CHECK-LABEL: @ashrsgt_03_02(
1208 ; CHECK-NEXT: ret i1 false
1211 %c = icmp sgt i4 %s, 2
1215 define i1 @ashrsgt_03_03(i4 %x) {
1216 ; CHECK-LABEL: @ashrsgt_03_03(
1217 ; CHECK-NEXT: ret i1 false
1220 %c = icmp sgt i4 %s, 3
1224 define i1 @ashrsgt_03_04(i4 %x) {
1225 ; CHECK-LABEL: @ashrsgt_03_04(
1226 ; CHECK-NEXT: ret i1 false
1229 %c = icmp sgt i4 %s, 4
1233 define i1 @ashrsgt_03_05(i4 %x) {
1234 ; CHECK-LABEL: @ashrsgt_03_05(
1235 ; CHECK-NEXT: ret i1 false
1238 %c = icmp sgt i4 %s, 5
1242 define i1 @ashrsgt_03_06(i4 %x) {
1243 ; CHECK-LABEL: @ashrsgt_03_06(
1244 ; CHECK-NEXT: ret i1 false
1247 %c = icmp sgt i4 %s, 6
1251 define i1 @ashrsgt_03_07(i4 %x) {
1252 ; CHECK-LABEL: @ashrsgt_03_07(
1253 ; CHECK-NEXT: ret i1 false
1256 %c = icmp sgt i4 %s, 7
1260 define i1 @ashrsgt_03_08(i4 %x) {
1261 ; CHECK-LABEL: @ashrsgt_03_08(
1262 ; CHECK-NEXT: ret i1 true
1265 %c = icmp sgt i4 %s, 8
1269 define i1 @ashrsgt_03_09(i4 %x) {
1270 ; CHECK-LABEL: @ashrsgt_03_09(
1271 ; CHECK-NEXT: ret i1 true
1274 %c = icmp sgt i4 %s, 9
1278 define i1 @ashrsgt_03_10(i4 %x) {
1279 ; CHECK-LABEL: @ashrsgt_03_10(
1280 ; CHECK-NEXT: ret i1 true
1283 %c = icmp sgt i4 %s, 10
1287 define i1 @ashrsgt_03_11(i4 %x) {
1288 ; CHECK-LABEL: @ashrsgt_03_11(
1289 ; CHECK-NEXT: ret i1 true
1292 %c = icmp sgt i4 %s, 11
1296 define i1 @ashrsgt_03_12(i4 %x) {
1297 ; CHECK-LABEL: @ashrsgt_03_12(
1298 ; CHECK-NEXT: ret i1 true
1301 %c = icmp sgt i4 %s, 12
1305 define i1 @ashrsgt_03_13(i4 %x) {
1306 ; CHECK-LABEL: @ashrsgt_03_13(
1307 ; CHECK-NEXT: ret i1 true
1310 %c = icmp sgt i4 %s, 13
1314 define i1 @ashrsgt_03_14(i4 %x) {
1315 ; CHECK-LABEL: @ashrsgt_03_14(
1316 ; CHECK-NEXT: ret i1 true
1319 %c = icmp sgt i4 %s, 14
1323 define i1 @ashrsgt_03_15(i4 %x) {
1324 ; CHECK-LABEL: @ashrsgt_03_15(
1325 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
1326 ; CHECK-NEXT: ret i1 [[C]]
1329 %c = icmp sgt i4 %s, 15
1333 define i1 @ashrslt_01_00(i4 %x) {
1334 ; CHECK-LABEL: @ashrslt_01_00(
1335 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
1336 ; CHECK-NEXT: ret i1 [[C]]
1339 %c = icmp slt i4 %s, 0
1343 define i1 @ashrslt_01_01(i4 %x) {
1344 ; CHECK-LABEL: @ashrslt_01_01(
1345 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 2
1346 ; CHECK-NEXT: ret i1 [[C]]
1349 %c = icmp slt i4 %s, 1
1353 define i1 @ashrslt_01_02(i4 %x) {
1354 ; CHECK-LABEL: @ashrslt_01_02(
1355 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 4
1356 ; CHECK-NEXT: ret i1 [[C]]
1359 %c = icmp slt i4 %s, 2
1363 define i1 @ashrslt_01_03(i4 %x) {
1364 ; CHECK-LABEL: @ashrslt_01_03(
1365 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 6
1366 ; CHECK-NEXT: ret i1 [[C]]
1369 %c = icmp slt i4 %s, 3
1373 define i1 @ashrslt_01_04(i4 %x) {
1374 ; CHECK-LABEL: @ashrslt_01_04(
1375 ; CHECK-NEXT: ret i1 true
1378 %c = icmp slt i4 %s, 4
1382 define i1 @ashrslt_01_05(i4 %x) {
1383 ; CHECK-LABEL: @ashrslt_01_05(
1384 ; CHECK-NEXT: ret i1 true
1387 %c = icmp slt i4 %s, 5
1391 define i1 @ashrslt_01_06(i4 %x) {
1392 ; CHECK-LABEL: @ashrslt_01_06(
1393 ; CHECK-NEXT: ret i1 true
1396 %c = icmp slt i4 %s, 6
1400 define i1 @ashrslt_01_07(i4 %x) {
1401 ; CHECK-LABEL: @ashrslt_01_07(
1402 ; CHECK-NEXT: ret i1 true
1405 %c = icmp slt i4 %s, 7
1409 define i1 @ashrslt_01_08(i4 %x) {
1410 ; CHECK-LABEL: @ashrslt_01_08(
1411 ; CHECK-NEXT: ret i1 false
1414 %c = icmp slt i4 %s, 8
1418 define i1 @ashrslt_01_09(i4 %x) {
1419 ; CHECK-LABEL: @ashrslt_01_09(
1420 ; CHECK-NEXT: ret i1 false
1423 %c = icmp slt i4 %s, 9
1427 define i1 @ashrslt_01_10(i4 %x) {
1428 ; CHECK-LABEL: @ashrslt_01_10(
1429 ; CHECK-NEXT: ret i1 false
1432 %c = icmp slt i4 %s, 10
1436 define i1 @ashrslt_01_11(i4 %x) {
1437 ; CHECK-LABEL: @ashrslt_01_11(
1438 ; CHECK-NEXT: ret i1 false
1441 %c = icmp slt i4 %s, 11
1445 define i1 @ashrslt_01_12(i4 %x) {
1446 ; CHECK-LABEL: @ashrslt_01_12(
1447 ; CHECK-NEXT: ret i1 false
1450 %c = icmp slt i4 %s, 12
1454 define i1 @ashrslt_01_13(i4 %x) {
1455 ; CHECK-LABEL: @ashrslt_01_13(
1456 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -6
1457 ; CHECK-NEXT: ret i1 [[C]]
1460 %c = icmp slt i4 %s, 13
1464 define i1 @ashrslt_01_14(i4 %x) {
1465 ; CHECK-LABEL: @ashrslt_01_14(
1466 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -4
1467 ; CHECK-NEXT: ret i1 [[C]]
1470 %c = icmp slt i4 %s, 14
1474 define i1 @ashrslt_01_15(i4 %x) {
1475 ; CHECK-LABEL: @ashrslt_01_15(
1476 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -2
1477 ; CHECK-NEXT: ret i1 [[C]]
1480 %c = icmp slt i4 %s, 15
1484 define i1 @ashrslt_02_00(i4 %x) {
1485 ; CHECK-LABEL: @ashrslt_02_00(
1486 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
1487 ; CHECK-NEXT: ret i1 [[C]]
1490 %c = icmp slt i4 %s, 0
1494 define i1 @ashrslt_02_01(i4 %x) {
1495 ; CHECK-LABEL: @ashrslt_02_01(
1496 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 4
1497 ; CHECK-NEXT: ret i1 [[C]]
1500 %c = icmp slt i4 %s, 1
1504 define i1 @ashrslt_02_02(i4 %x) {
1505 ; CHECK-LABEL: @ashrslt_02_02(
1506 ; CHECK-NEXT: ret i1 true
1509 %c = icmp slt i4 %s, 2
1513 define i1 @ashrslt_02_03(i4 %x) {
1514 ; CHECK-LABEL: @ashrslt_02_03(
1515 ; CHECK-NEXT: ret i1 true
1518 %c = icmp slt i4 %s, 3
1522 define i1 @ashrslt_02_04(i4 %x) {
1523 ; CHECK-LABEL: @ashrslt_02_04(
1524 ; CHECK-NEXT: ret i1 true
1527 %c = icmp slt i4 %s, 4
1531 define i1 @ashrslt_02_05(i4 %x) {
1532 ; CHECK-LABEL: @ashrslt_02_05(
1533 ; CHECK-NEXT: ret i1 true
1536 %c = icmp slt i4 %s, 5
1540 define i1 @ashrslt_02_06(i4 %x) {
1541 ; CHECK-LABEL: @ashrslt_02_06(
1542 ; CHECK-NEXT: ret i1 true
1545 %c = icmp slt i4 %s, 6
1549 define i1 @ashrslt_02_07(i4 %x) {
1550 ; CHECK-LABEL: @ashrslt_02_07(
1551 ; CHECK-NEXT: ret i1 true
1554 %c = icmp slt i4 %s, 7
1558 define i1 @ashrslt_02_08(i4 %x) {
1559 ; CHECK-LABEL: @ashrslt_02_08(
1560 ; CHECK-NEXT: ret i1 false
1563 %c = icmp slt i4 %s, 8
1567 define i1 @ashrslt_02_09(i4 %x) {
1568 ; CHECK-LABEL: @ashrslt_02_09(
1569 ; CHECK-NEXT: ret i1 false
1572 %c = icmp slt i4 %s, 9
1576 define i1 @ashrslt_02_10(i4 %x) {
1577 ; CHECK-LABEL: @ashrslt_02_10(
1578 ; CHECK-NEXT: ret i1 false
1581 %c = icmp slt i4 %s, 10
1585 define i1 @ashrslt_02_11(i4 %x) {
1586 ; CHECK-LABEL: @ashrslt_02_11(
1587 ; CHECK-NEXT: ret i1 false
1590 %c = icmp slt i4 %s, 11
1594 define i1 @ashrslt_02_12(i4 %x) {
1595 ; CHECK-LABEL: @ashrslt_02_12(
1596 ; CHECK-NEXT: ret i1 false
1599 %c = icmp slt i4 %s, 12
1603 define i1 @ashrslt_02_13(i4 %x) {
1604 ; CHECK-LABEL: @ashrslt_02_13(
1605 ; CHECK-NEXT: ret i1 false
1608 %c = icmp slt i4 %s, 13
1612 define i1 @ashrslt_02_14(i4 %x) {
1613 ; CHECK-LABEL: @ashrslt_02_14(
1614 ; CHECK-NEXT: ret i1 false
1617 %c = icmp slt i4 %s, 14
1621 define i1 @ashrslt_02_15(i4 %x) {
1622 ; CHECK-LABEL: @ashrslt_02_15(
1623 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -4
1624 ; CHECK-NEXT: ret i1 [[C]]
1627 %c = icmp slt i4 %s, 15
1631 define i1 @ashrslt_03_00(i4 %x) {
1632 ; CHECK-LABEL: @ashrslt_03_00(
1633 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
1634 ; CHECK-NEXT: ret i1 [[C]]
1637 %c = icmp slt i4 %s, 0
1641 define i1 @ashrslt_03_01(i4 %x) {
1642 ; CHECK-LABEL: @ashrslt_03_01(
1643 ; CHECK-NEXT: ret i1 true
1646 %c = icmp slt i4 %s, 1
1650 define i1 @ashrslt_03_02(i4 %x) {
1651 ; CHECK-LABEL: @ashrslt_03_02(
1652 ; CHECK-NEXT: ret i1 true
1655 %c = icmp slt i4 %s, 2
1659 define i1 @ashrslt_03_03(i4 %x) {
1660 ; CHECK-LABEL: @ashrslt_03_03(
1661 ; CHECK-NEXT: ret i1 true
1664 %c = icmp slt i4 %s, 3
1668 define i1 @ashrslt_03_04(i4 %x) {
1669 ; CHECK-LABEL: @ashrslt_03_04(
1670 ; CHECK-NEXT: ret i1 true
1673 %c = icmp slt i4 %s, 4
1677 define i1 @ashrslt_03_05(i4 %x) {
1678 ; CHECK-LABEL: @ashrslt_03_05(
1679 ; CHECK-NEXT: ret i1 true
1682 %c = icmp slt i4 %s, 5
1686 define i1 @ashrslt_03_06(i4 %x) {
1687 ; CHECK-LABEL: @ashrslt_03_06(
1688 ; CHECK-NEXT: ret i1 true
1691 %c = icmp slt i4 %s, 6
1695 define i1 @ashrslt_03_07(i4 %x) {
1696 ; CHECK-LABEL: @ashrslt_03_07(
1697 ; CHECK-NEXT: ret i1 true
1700 %c = icmp slt i4 %s, 7
1704 define i1 @ashrslt_03_08(i4 %x) {
1705 ; CHECK-LABEL: @ashrslt_03_08(
1706 ; CHECK-NEXT: ret i1 false
1709 %c = icmp slt i4 %s, 8
1713 define i1 @ashrslt_03_09(i4 %x) {
1714 ; CHECK-LABEL: @ashrslt_03_09(
1715 ; CHECK-NEXT: ret i1 false
1718 %c = icmp slt i4 %s, 9
1722 define i1 @ashrslt_03_10(i4 %x) {
1723 ; CHECK-LABEL: @ashrslt_03_10(
1724 ; CHECK-NEXT: ret i1 false
1727 %c = icmp slt i4 %s, 10
1731 define i1 @ashrslt_03_11(i4 %x) {
1732 ; CHECK-LABEL: @ashrslt_03_11(
1733 ; CHECK-NEXT: ret i1 false
1736 %c = icmp slt i4 %s, 11
1740 define i1 @ashrslt_03_12(i4 %x) {
1741 ; CHECK-LABEL: @ashrslt_03_12(
1742 ; CHECK-NEXT: ret i1 false
1745 %c = icmp slt i4 %s, 12
1749 define i1 @ashrslt_03_13(i4 %x) {
1750 ; CHECK-LABEL: @ashrslt_03_13(
1751 ; CHECK-NEXT: ret i1 false
1754 %c = icmp slt i4 %s, 13
1758 define i1 @ashrslt_03_14(i4 %x) {
1759 ; CHECK-LABEL: @ashrslt_03_14(
1760 ; CHECK-NEXT: ret i1 false
1763 %c = icmp slt i4 %s, 14
1767 define i1 @ashrslt_03_15(i4 %x) {
1768 ; CHECK-LABEL: @ashrslt_03_15(
1769 ; CHECK-NEXT: ret i1 false
1772 %c = icmp slt i4 %s, 15
1776 define i1 @lshrugt_01_00_exact(i4 %x) {
1777 ; CHECK-LABEL: @lshrugt_01_00_exact(
1778 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], 0
1779 ; CHECK-NEXT: ret i1 [[C]]
1781 %s = lshr exact i4 %x, 1
1782 %c = icmp ugt i4 %s, 0
1786 define i1 @lshrugt_01_01_exact(i4 %x) {
1787 ; CHECK-LABEL: @lshrugt_01_01_exact(
1788 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 2
1789 ; CHECK-NEXT: ret i1 [[C]]
1791 %s = lshr exact i4 %x, 1
1792 %c = icmp ugt i4 %s, 1
1796 define i1 @lshrugt_01_02_exact(i4 %x) {
1797 ; CHECK-LABEL: @lshrugt_01_02_exact(
1798 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 4
1799 ; CHECK-NEXT: ret i1 [[C]]
1801 %s = lshr exact i4 %x, 1
1802 %c = icmp ugt i4 %s, 2
1806 define i1 @lshrugt_01_03_exact(i4 %x) {
1807 ; CHECK-LABEL: @lshrugt_01_03_exact(
1808 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 6
1809 ; CHECK-NEXT: ret i1 [[C]]
1811 %s = lshr exact i4 %x, 1
1812 %c = icmp ugt i4 %s, 3
1816 define i1 @lshrugt_01_04_exact(i4 %x) {
1817 ; CHECK-LABEL: @lshrugt_01_04_exact(
1818 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], -8
1819 ; CHECK-NEXT: ret i1 [[C]]
1821 %s = lshr exact i4 %x, 1
1822 %c = icmp ugt i4 %s, 4
1826 define i1 @lshrugt_01_05_exact(i4 %x) {
1827 ; CHECK-LABEL: @lshrugt_01_05_exact(
1828 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], -6
1829 ; CHECK-NEXT: ret i1 [[C]]
1831 %s = lshr exact i4 %x, 1
1832 %c = icmp ugt i4 %s, 5
1836 define i1 @lshrugt_01_06_exact(i4 %x) {
1837 ; CHECK-LABEL: @lshrugt_01_06_exact(
1838 ; CHECK-NEXT: [[C:%.*]] = icmp eq i4 [[X:%.*]], -2
1839 ; CHECK-NEXT: ret i1 [[C]]
1841 %s = lshr exact i4 %x, 1
1842 %c = icmp ugt i4 %s, 6
1846 define i1 @lshrugt_01_07_exact(i4 %x) {
1847 ; CHECK-LABEL: @lshrugt_01_07_exact(
1848 ; CHECK-NEXT: ret i1 false
1850 %s = lshr exact i4 %x, 1
1851 %c = icmp ugt i4 %s, 7
1855 define i1 @lshrugt_01_08_exact(i4 %x) {
1856 ; CHECK-LABEL: @lshrugt_01_08_exact(
1857 ; CHECK-NEXT: ret i1 false
1859 %s = lshr exact i4 %x, 1
1860 %c = icmp ugt i4 %s, 8
1864 define i1 @lshrugt_01_09_exact(i4 %x) {
1865 ; CHECK-LABEL: @lshrugt_01_09_exact(
1866 ; CHECK-NEXT: ret i1 false
1868 %s = lshr exact i4 %x, 1
1869 %c = icmp ugt i4 %s, 9
1873 define i1 @lshrugt_01_10_exact(i4 %x) {
1874 ; CHECK-LABEL: @lshrugt_01_10_exact(
1875 ; CHECK-NEXT: ret i1 false
1877 %s = lshr exact i4 %x, 1
1878 %c = icmp ugt i4 %s, 10
1882 define i1 @lshrugt_01_11_exact(i4 %x) {
1883 ; CHECK-LABEL: @lshrugt_01_11_exact(
1884 ; CHECK-NEXT: ret i1 false
1886 %s = lshr exact i4 %x, 1
1887 %c = icmp ugt i4 %s, 11
1891 define i1 @lshrugt_01_12_exact(i4 %x) {
1892 ; CHECK-LABEL: @lshrugt_01_12_exact(
1893 ; CHECK-NEXT: ret i1 false
1895 %s = lshr exact i4 %x, 1
1896 %c = icmp ugt i4 %s, 12
1900 define i1 @lshrugt_01_13_exact(i4 %x) {
1901 ; CHECK-LABEL: @lshrugt_01_13_exact(
1902 ; CHECK-NEXT: ret i1 false
1904 %s = lshr exact i4 %x, 1
1905 %c = icmp ugt i4 %s, 13
1909 define i1 @lshrugt_01_14_exact(i4 %x) {
1910 ; CHECK-LABEL: @lshrugt_01_14_exact(
1911 ; CHECK-NEXT: ret i1 false
1913 %s = lshr exact i4 %x, 1
1914 %c = icmp ugt i4 %s, 14
1918 define i1 @lshrugt_01_15_exact(i4 %x) {
1919 ; CHECK-LABEL: @lshrugt_01_15_exact(
1920 ; CHECK-NEXT: ret i1 false
1922 %s = lshr exact i4 %x, 1
1923 %c = icmp ugt i4 %s, 15
1927 define i1 @lshrugt_02_00_exact(i4 %x) {
1928 ; CHECK-LABEL: @lshrugt_02_00_exact(
1929 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], 0
1930 ; CHECK-NEXT: ret i1 [[C]]
1932 %s = lshr exact i4 %x, 2
1933 %c = icmp ugt i4 %s, 0
1937 define i1 @lshrugt_02_01_exact(i4 %x) {
1938 ; CHECK-LABEL: @lshrugt_02_01_exact(
1939 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i4 [[X:%.*]], 4
1940 ; CHECK-NEXT: ret i1 [[C]]
1942 %s = lshr exact i4 %x, 2
1943 %c = icmp ugt i4 %s, 1
1947 define i1 @lshrugt_02_02_exact(i4 %x) {
1948 ; CHECK-LABEL: @lshrugt_02_02_exact(
1949 ; CHECK-NEXT: [[C:%.*]] = icmp eq i4 [[X:%.*]], -4
1950 ; CHECK-NEXT: ret i1 [[C]]
1952 %s = lshr exact i4 %x, 2
1953 %c = icmp ugt i4 %s, 2
1957 define i1 @lshrugt_02_03_exact(i4 %x) {
1958 ; CHECK-LABEL: @lshrugt_02_03_exact(
1959 ; CHECK-NEXT: ret i1 false
1961 %s = lshr exact i4 %x, 2
1962 %c = icmp ugt i4 %s, 3
1966 define i1 @lshrugt_02_04_exact(i4 %x) {
1967 ; CHECK-LABEL: @lshrugt_02_04_exact(
1968 ; CHECK-NEXT: ret i1 false
1970 %s = lshr exact i4 %x, 2
1971 %c = icmp ugt i4 %s, 4
1975 define i1 @lshrugt_02_05_exact(i4 %x) {
1976 ; CHECK-LABEL: @lshrugt_02_05_exact(
1977 ; CHECK-NEXT: ret i1 false
1979 %s = lshr exact i4 %x, 2
1980 %c = icmp ugt i4 %s, 5
1984 define i1 @lshrugt_02_06_exact(i4 %x) {
1985 ; CHECK-LABEL: @lshrugt_02_06_exact(
1986 ; CHECK-NEXT: ret i1 false
1988 %s = lshr exact i4 %x, 2
1989 %c = icmp ugt i4 %s, 6
1993 define i1 @lshrugt_02_07_exact(i4 %x) {
1994 ; CHECK-LABEL: @lshrugt_02_07_exact(
1995 ; CHECK-NEXT: ret i1 false
1997 %s = lshr exact i4 %x, 2
1998 %c = icmp ugt i4 %s, 7
2002 define i1 @lshrugt_02_08_exact(i4 %x) {
2003 ; CHECK-LABEL: @lshrugt_02_08_exact(
2004 ; CHECK-NEXT: ret i1 false
2006 %s = lshr exact i4 %x, 2
2007 %c = icmp ugt i4 %s, 8
2011 define i1 @lshrugt_02_09_exact(i4 %x) {
2012 ; CHECK-LABEL: @lshrugt_02_09_exact(
2013 ; CHECK-NEXT: ret i1 false
2015 %s = lshr exact i4 %x, 2
2016 %c = icmp ugt i4 %s, 9
2020 define i1 @lshrugt_02_10_exact(i4 %x) {
2021 ; CHECK-LABEL: @lshrugt_02_10_exact(
2022 ; CHECK-NEXT: ret i1 false
2024 %s = lshr exact i4 %x, 2
2025 %c = icmp ugt i4 %s, 10
2029 define i1 @lshrugt_02_11_exact(i4 %x) {
2030 ; CHECK-LABEL: @lshrugt_02_11_exact(
2031 ; CHECK-NEXT: ret i1 false
2033 %s = lshr exact i4 %x, 2
2034 %c = icmp ugt i4 %s, 11
2038 define i1 @lshrugt_02_12_exact(i4 %x) {
2039 ; CHECK-LABEL: @lshrugt_02_12_exact(
2040 ; CHECK-NEXT: ret i1 false
2042 %s = lshr exact i4 %x, 2
2043 %c = icmp ugt i4 %s, 12
2047 define i1 @lshrugt_02_13_exact(i4 %x) {
2048 ; CHECK-LABEL: @lshrugt_02_13_exact(
2049 ; CHECK-NEXT: ret i1 false
2051 %s = lshr exact i4 %x, 2
2052 %c = icmp ugt i4 %s, 13
2056 define i1 @lshrugt_02_14_exact(i4 %x) {
2057 ; CHECK-LABEL: @lshrugt_02_14_exact(
2058 ; CHECK-NEXT: ret i1 false
2060 %s = lshr exact i4 %x, 2
2061 %c = icmp ugt i4 %s, 14
2065 define i1 @lshrugt_02_15_exact(i4 %x) {
2066 ; CHECK-LABEL: @lshrugt_02_15_exact(
2067 ; CHECK-NEXT: ret i1 false
2069 %s = lshr exact i4 %x, 2
2070 %c = icmp ugt i4 %s, 15
2074 define i1 @lshrugt_03_00_exact(i4 %x) {
2075 ; CHECK-LABEL: @lshrugt_03_00_exact(
2076 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], 0
2077 ; CHECK-NEXT: ret i1 [[C]]
2079 %s = lshr exact i4 %x, 3
2080 %c = icmp ugt i4 %s, 0
2084 define i1 @lshrugt_03_01_exact(i4 %x) {
2085 ; CHECK-LABEL: @lshrugt_03_01_exact(
2086 ; CHECK-NEXT: ret i1 false
2088 %s = lshr exact i4 %x, 3
2089 %c = icmp ugt i4 %s, 1
2093 define i1 @lshrugt_03_02_exact(i4 %x) {
2094 ; CHECK-LABEL: @lshrugt_03_02_exact(
2095 ; CHECK-NEXT: ret i1 false
2097 %s = lshr exact i4 %x, 3
2098 %c = icmp ugt i4 %s, 2
2102 define i1 @lshrugt_03_03_exact(i4 %x) {
2103 ; CHECK-LABEL: @lshrugt_03_03_exact(
2104 ; CHECK-NEXT: ret i1 false
2106 %s = lshr exact i4 %x, 3
2107 %c = icmp ugt i4 %s, 3
2111 define i1 @lshrugt_03_04_exact(i4 %x) {
2112 ; CHECK-LABEL: @lshrugt_03_04_exact(
2113 ; CHECK-NEXT: ret i1 false
2115 %s = lshr exact i4 %x, 3
2116 %c = icmp ugt i4 %s, 4
2120 define i1 @lshrugt_03_05_exact(i4 %x) {
2121 ; CHECK-LABEL: @lshrugt_03_05_exact(
2122 ; CHECK-NEXT: ret i1 false
2124 %s = lshr exact i4 %x, 3
2125 %c = icmp ugt i4 %s, 5
2129 define i1 @lshrugt_03_06_exact(i4 %x) {
2130 ; CHECK-LABEL: @lshrugt_03_06_exact(
2131 ; CHECK-NEXT: ret i1 false
2133 %s = lshr exact i4 %x, 3
2134 %c = icmp ugt i4 %s, 6
2138 define i1 @lshrugt_03_07_exact(i4 %x) {
2139 ; CHECK-LABEL: @lshrugt_03_07_exact(
2140 ; CHECK-NEXT: ret i1 false
2142 %s = lshr exact i4 %x, 3
2143 %c = icmp ugt i4 %s, 7
2147 define i1 @lshrugt_03_08_exact(i4 %x) {
2148 ; CHECK-LABEL: @lshrugt_03_08_exact(
2149 ; CHECK-NEXT: ret i1 false
2151 %s = lshr exact i4 %x, 3
2152 %c = icmp ugt i4 %s, 8
2156 define i1 @lshrugt_03_09_exact(i4 %x) {
2157 ; CHECK-LABEL: @lshrugt_03_09_exact(
2158 ; CHECK-NEXT: ret i1 false
2160 %s = lshr exact i4 %x, 3
2161 %c = icmp ugt i4 %s, 9
2165 define i1 @lshrugt_03_10_exact(i4 %x) {
2166 ; CHECK-LABEL: @lshrugt_03_10_exact(
2167 ; CHECK-NEXT: ret i1 false
2169 %s = lshr exact i4 %x, 3
2170 %c = icmp ugt i4 %s, 10
2174 define i1 @lshrugt_03_11_exact(i4 %x) {
2175 ; CHECK-LABEL: @lshrugt_03_11_exact(
2176 ; CHECK-NEXT: ret i1 false
2178 %s = lshr exact i4 %x, 3
2179 %c = icmp ugt i4 %s, 11
2183 define i1 @lshrugt_03_12_exact(i4 %x) {
2184 ; CHECK-LABEL: @lshrugt_03_12_exact(
2185 ; CHECK-NEXT: ret i1 false
2187 %s = lshr exact i4 %x, 3
2188 %c = icmp ugt i4 %s, 12
2192 define i1 @lshrugt_03_13_exact(i4 %x) {
2193 ; CHECK-LABEL: @lshrugt_03_13_exact(
2194 ; CHECK-NEXT: ret i1 false
2196 %s = lshr exact i4 %x, 3
2197 %c = icmp ugt i4 %s, 13
2201 define i1 @lshrugt_03_14_exact(i4 %x) {
2202 ; CHECK-LABEL: @lshrugt_03_14_exact(
2203 ; CHECK-NEXT: ret i1 false
2205 %s = lshr exact i4 %x, 3
2206 %c = icmp ugt i4 %s, 14
2210 define i1 @lshrugt_03_15_exact(i4 %x) {
2211 ; CHECK-LABEL: @lshrugt_03_15_exact(
2212 ; CHECK-NEXT: ret i1 false
2214 %s = lshr exact i4 %x, 3
2215 %c = icmp ugt i4 %s, 15
2219 define i1 @ashr_eq_exact(i8 %x) {
2220 ; CHECK-LABEL: @ashr_eq_exact(
2221 ; CHECK-NEXT: [[C:%.*]] = icmp eq i8 [[X:%.*]], 80
2222 ; CHECK-NEXT: ret i1 [[C]]
2224 %s = ashr exact i8 %x, 3
2225 %c = icmp eq i8 %s, 10
2229 define i1 @ashr_ne_exact(i8 %x) {
2230 ; CHECK-LABEL: @ashr_ne_exact(
2231 ; CHECK-NEXT: [[C:%.*]] = icmp ne i8 [[X:%.*]], 80
2232 ; CHECK-NEXT: ret i1 [[C]]
2234 %s = ashr exact i8 %x, 3
2235 %c = icmp ne i8 %s, 10
2239 define i1 @ashr_ugt_exact(i8 %x) {
2240 ; CHECK-LABEL: @ashr_ugt_exact(
2241 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i8 [[X:%.*]], 80
2242 ; CHECK-NEXT: ret i1 [[C]]
2244 %s = ashr exact i8 %x, 3
2245 %c = icmp ugt i8 %s, 10
2250 define i1 @ashr_uge_exact(i8 %x) {
2251 ; CHECK-LABEL: @ashr_uge_exact(
2252 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i8 [[X:%.*]], 72
2253 ; CHECK-NEXT: ret i1 [[C]]
2255 %s = ashr exact i8 %x, 3
2256 %c = icmp uge i8 %s, 10
2260 define i1 @ashr_ult_exact(i8 %x) {
2261 ; CHECK-LABEL: @ashr_ult_exact(
2262 ; CHECK-NEXT: [[C:%.*]] = icmp ult i8 [[X:%.*]], 80
2263 ; CHECK-NEXT: ret i1 [[C]]
2265 %s = ashr exact i8 %x, 3
2266 %c = icmp ult i8 %s, 10
2271 define i1 @ashr_ule_exact(i8 %x) {
2272 ; CHECK-LABEL: @ashr_ule_exact(
2273 ; CHECK-NEXT: [[C:%.*]] = icmp ult i8 [[X:%.*]], 88
2274 ; CHECK-NEXT: ret i1 [[C]]
2276 %s = ashr exact i8 %x, 3
2277 %c = icmp ule i8 %s, 10
2282 define i1 @ashr_sgt_exact(i8 %x) {
2283 ; CHECK-LABEL: @ashr_sgt_exact(
2284 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i8 [[X:%.*]], 80
2285 ; CHECK-NEXT: ret i1 [[C]]
2287 %s = ashr exact i8 %x, 3
2288 %c = icmp sgt i8 %s, 10
2293 define i1 @ashr_sge_exact(i8 %x) {
2294 ; CHECK-LABEL: @ashr_sge_exact(
2295 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i8 [[X:%.*]], 72
2296 ; CHECK-NEXT: ret i1 [[C]]
2298 %s = ashr exact i8 %x, 3
2299 %c = icmp sge i8 %s, 10
2303 define i1 @ashr_slt_exact(i8 %x) {
2304 ; CHECK-LABEL: @ashr_slt_exact(
2305 ; CHECK-NEXT: [[C:%.*]] = icmp slt i8 [[X:%.*]], 80
2306 ; CHECK-NEXT: ret i1 [[C]]
2308 %s = ashr exact i8 %x, 3
2309 %c = icmp slt i8 %s, 10
2313 define i1 @ashr_sle_exact(i8 %x) {
2314 ; CHECK-LABEL: @ashr_sle_exact(
2315 ; CHECK-NEXT: [[C:%.*]] = icmp slt i8 [[X:%.*]], 88
2316 ; CHECK-NEXT: ret i1 [[C]]
2318 %s = ashr exact i8 %x, 3
2319 %c = icmp sle i8 %s, 10
2323 define i1 @ashr_eq_noexact(i8 %x) {
2324 ; CHECK-LABEL: @ashr_eq_noexact(
2325 ; CHECK-NEXT: [[S_MASK:%.*]] = and i8 [[X:%.*]], -8
2326 ; CHECK-NEXT: [[C:%.*]] = icmp eq i8 [[S_MASK]], 80
2327 ; CHECK-NEXT: ret i1 [[C]]
2330 %c = icmp eq i8 %s, 10
2334 define i1 @ashr_ne_noexact(i8 %x) {
2335 ; CHECK-LABEL: @ashr_ne_noexact(
2336 ; CHECK-NEXT: [[S_MASK:%.*]] = and i8 [[X:%.*]], -8
2337 ; CHECK-NEXT: [[C:%.*]] = icmp ne i8 [[S_MASK]], 80
2338 ; CHECK-NEXT: ret i1 [[C]]
2341 %c = icmp ne i8 %s, 10
2345 define i1 @ashr_ugt_noexact(i8 %x) {
2346 ; CHECK-LABEL: @ashr_ugt_noexact(
2347 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i8 [[X:%.*]], 87
2348 ; CHECK-NEXT: ret i1 [[C]]
2351 %c = icmp ugt i8 %s, 10
2356 define i1 @ashr_uge_noexact(i8 %x) {
2357 ; CHECK-LABEL: @ashr_uge_noexact(
2358 ; CHECK-NEXT: [[C:%.*]] = icmp ugt i8 [[X:%.*]], 79
2359 ; CHECK-NEXT: ret i1 [[C]]
2362 %c = icmp uge i8 %s, 10
2366 define i1 @ashr_ult_noexact(i8 %x) {
2367 ; CHECK-LABEL: @ashr_ult_noexact(
2368 ; CHECK-NEXT: [[C:%.*]] = icmp ult i8 [[X:%.*]], 80
2369 ; CHECK-NEXT: ret i1 [[C]]
2372 %c = icmp ult i8 %s, 10
2377 define i1 @ashr_ule_noexact(i8 %x) {
2378 ; CHECK-LABEL: @ashr_ule_noexact(
2379 ; CHECK-NEXT: [[C:%.*]] = icmp ult i8 [[X:%.*]], 88
2380 ; CHECK-NEXT: ret i1 [[C]]
2383 %c = icmp ule i8 %s, 10
2388 define i1 @ashr_sgt_noexact(i8 %x) {
2389 ; CHECK-LABEL: @ashr_sgt_noexact(
2390 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i8 [[X:%.*]], 87
2391 ; CHECK-NEXT: ret i1 [[C]]
2394 %c = icmp sgt i8 %s, 10
2399 define i1 @ashr_sge_noexact(i8 %x) {
2400 ; CHECK-LABEL: @ashr_sge_noexact(
2401 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i8 [[X:%.*]], 79
2402 ; CHECK-NEXT: ret i1 [[C]]
2405 %c = icmp sge i8 %s, 10
2409 define i1 @ashr_slt_noexact(i8 %x) {
2410 ; CHECK-LABEL: @ashr_slt_noexact(
2411 ; CHECK-NEXT: [[C:%.*]] = icmp slt i8 [[X:%.*]], 80
2412 ; CHECK-NEXT: ret i1 [[C]]
2415 %c = icmp slt i8 %s, 10
2419 define i1 @ashr_sle_noexact(i8 %x) {
2420 ; CHECK-LABEL: @ashr_sle_noexact(
2421 ; CHECK-NEXT: [[C:%.*]] = icmp slt i8 [[X:%.*]], 88
2422 ; CHECK-NEXT: ret i1 [[C]]
2425 %c = icmp sle i8 %s, 10
2429 define i1 @ashr_00_00_ashr_extra_use(i8 %x, i8* %ptr) {
2430 ; CHECK-LABEL: @ashr_00_00_ashr_extra_use(
2431 ; CHECK-NEXT: [[S:%.*]] = ashr exact i8 [[X:%.*]], 3
2432 ; CHECK-NEXT: [[C:%.*]] = icmp ult i8 [[X]], 88
2433 ; CHECK-NEXT: store i8 [[S]], i8* [[PTR:%.*]], align 1
2434 ; CHECK-NEXT: ret i1 [[C]]
2436 %s = ashr exact i8 %x, 3
2437 %c = icmp ule i8 %s, 10
2438 store i8 %s, i8* %ptr
2442 define <4 x i1> @ashr_00_00_vec(<4 x i8> %x) {
2443 ; CHECK-LABEL: @ashr_00_00_vec(
2444 ; CHECK-NEXT: [[C:%.*]] = icmp ult <4 x i8> [[X:%.*]], <i8 88, i8 88, i8 88, i8 88>
2445 ; CHECK-NEXT: ret <4 x i1> [[C]]
2447 %s = ashr exact <4 x i8> %x, <i8 3,i8 3, i8 3, i8 3>
2448 %c = icmp ule <4 x i8> %s, <i8 10,i8 10,i8 10,i8 10>
2452 define i1 @ashr_sgt_overflow(i8 %x) {
2453 ; CHECK-LABEL: @ashr_sgt_overflow(
2454 ; CHECK-NEXT: ret i1 false
2457 %c = icmp sgt i8 %s, 63
2461 define i1 @lshrult_01_00_exact(i4 %x) {
2462 ; CHECK-LABEL: @lshrult_01_00_exact(
2463 ; CHECK-NEXT: ret i1 false
2465 %s = lshr exact i4 %x, 1
2466 %c = icmp ult i4 %s, 0
2470 define i1 @lshrult_01_01_exact(i4 %x) {
2471 ; CHECK-LABEL: @lshrult_01_01_exact(
2472 ; CHECK-NEXT: [[C:%.*]] = icmp eq i4 [[X:%.*]], 0
2473 ; CHECK-NEXT: ret i1 [[C]]
2475 %s = lshr exact i4 %x, 1
2476 %c = icmp ult i4 %s, 1
2480 define i1 @lshrult_01_02_exact(i4 %x) {
2481 ; CHECK-LABEL: @lshrult_01_02_exact(
2482 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], 4
2483 ; CHECK-NEXT: ret i1 [[C]]
2485 %s = lshr exact i4 %x, 1
2486 %c = icmp ult i4 %s, 2
2490 define i1 @lshrult_01_03_exact(i4 %x) {
2491 ; CHECK-LABEL: @lshrult_01_03_exact(
2492 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], 6
2493 ; CHECK-NEXT: ret i1 [[C]]
2495 %s = lshr exact i4 %x, 1
2496 %c = icmp ult i4 %s, 3
2500 define i1 @lshrult_01_04_exact(i4 %x) {
2501 ; CHECK-LABEL: @lshrult_01_04_exact(
2502 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
2503 ; CHECK-NEXT: ret i1 [[C]]
2505 %s = lshr exact i4 %x, 1
2506 %c = icmp ult i4 %s, 4
2510 define i1 @lshrult_01_05_exact(i4 %x) {
2511 ; CHECK-LABEL: @lshrult_01_05_exact(
2512 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], -6
2513 ; CHECK-NEXT: ret i1 [[C]]
2515 %s = lshr exact i4 %x, 1
2516 %c = icmp ult i4 %s, 5
2520 define i1 @lshrult_01_06_exact(i4 %x) {
2521 ; CHECK-LABEL: @lshrult_01_06_exact(
2522 ; CHECK-NEXT: [[C:%.*]] = icmp ult i4 [[X:%.*]], -4
2523 ; CHECK-NEXT: ret i1 [[C]]
2525 %s = lshr exact i4 %x, 1
2526 %c = icmp ult i4 %s, 6
2530 define i1 @lshrult_01_07_exact(i4 %x) {
2531 ; CHECK-LABEL: @lshrult_01_07_exact(
2532 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], -2
2533 ; CHECK-NEXT: ret i1 [[C]]
2535 %s = lshr exact i4 %x, 1
2536 %c = icmp ult i4 %s, 7
2540 define i1 @lshrult_01_08_exact(i4 %x) {
2541 ; CHECK-LABEL: @lshrult_01_08_exact(
2542 ; CHECK-NEXT: ret i1 true
2544 %s = lshr exact i4 %x, 1
2545 %c = icmp ult i4 %s, 8
2549 define i1 @lshrult_01_09_exact(i4 %x) {
2550 ; CHECK-LABEL: @lshrult_01_09_exact(
2551 ; CHECK-NEXT: ret i1 true
2553 %s = lshr exact i4 %x, 1
2554 %c = icmp ult i4 %s, 9
2558 define i1 @lshrult_01_10_exact(i4 %x) {
2559 ; CHECK-LABEL: @lshrult_01_10_exact(
2560 ; CHECK-NEXT: ret i1 true
2562 %s = lshr exact i4 %x, 1
2563 %c = icmp ult i4 %s, 10
2567 define i1 @lshrult_01_11_exact(i4 %x) {
2568 ; CHECK-LABEL: @lshrult_01_11_exact(
2569 ; CHECK-NEXT: ret i1 true
2571 %s = lshr exact i4 %x, 1
2572 %c = icmp ult i4 %s, 11
2576 define i1 @lshrult_01_12_exact(i4 %x) {
2577 ; CHECK-LABEL: @lshrult_01_12_exact(
2578 ; CHECK-NEXT: ret i1 true
2580 %s = lshr exact i4 %x, 1
2581 %c = icmp ult i4 %s, 12
2585 define i1 @lshrult_01_13_exact(i4 %x) {
2586 ; CHECK-LABEL: @lshrult_01_13_exact(
2587 ; CHECK-NEXT: ret i1 true
2589 %s = lshr exact i4 %x, 1
2590 %c = icmp ult i4 %s, 13
2594 define i1 @lshrult_01_14_exact(i4 %x) {
2595 ; CHECK-LABEL: @lshrult_01_14_exact(
2596 ; CHECK-NEXT: ret i1 true
2598 %s = lshr exact i4 %x, 1
2599 %c = icmp ult i4 %s, 14
2603 define i1 @lshrult_01_15_exact(i4 %x) {
2604 ; CHECK-LABEL: @lshrult_01_15_exact(
2605 ; CHECK-NEXT: ret i1 true
2607 %s = lshr exact i4 %x, 1
2608 %c = icmp ult i4 %s, 15
2612 define i1 @lshrult_02_00_exact(i4 %x) {
2613 ; CHECK-LABEL: @lshrult_02_00_exact(
2614 ; CHECK-NEXT: ret i1 false
2616 %s = lshr exact i4 %x, 2
2617 %c = icmp ult i4 %s, 0
2621 define i1 @lshrult_02_01_exact(i4 %x) {
2622 ; CHECK-LABEL: @lshrult_02_01_exact(
2623 ; CHECK-NEXT: [[C:%.*]] = icmp eq i4 [[X:%.*]], 0
2624 ; CHECK-NEXT: ret i1 [[C]]
2626 %s = lshr exact i4 %x, 2
2627 %c = icmp ult i4 %s, 1
2631 define i1 @lshrult_02_02_exact(i4 %x) {
2632 ; CHECK-LABEL: @lshrult_02_02_exact(
2633 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
2634 ; CHECK-NEXT: ret i1 [[C]]
2636 %s = lshr exact i4 %x, 2
2637 %c = icmp ult i4 %s, 2
2641 define i1 @lshrult_02_03_exact(i4 %x) {
2642 ; CHECK-LABEL: @lshrult_02_03_exact(
2643 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], -4
2644 ; CHECK-NEXT: ret i1 [[C]]
2646 %s = lshr exact i4 %x, 2
2647 %c = icmp ult i4 %s, 3
2651 define i1 @lshrult_02_04_exact(i4 %x) {
2652 ; CHECK-LABEL: @lshrult_02_04_exact(
2653 ; CHECK-NEXT: ret i1 true
2655 %s = lshr exact i4 %x, 2
2656 %c = icmp ult i4 %s, 4
2660 define i1 @lshrult_02_05_exact(i4 %x) {
2661 ; CHECK-LABEL: @lshrult_02_05_exact(
2662 ; CHECK-NEXT: ret i1 true
2664 %s = lshr exact i4 %x, 2
2665 %c = icmp ult i4 %s, 5
2669 define i1 @lshrult_02_06_exact(i4 %x) {
2670 ; CHECK-LABEL: @lshrult_02_06_exact(
2671 ; CHECK-NEXT: ret i1 true
2673 %s = lshr exact i4 %x, 2
2674 %c = icmp ult i4 %s, 6
2678 define i1 @lshrult_02_07_exact(i4 %x) {
2679 ; CHECK-LABEL: @lshrult_02_07_exact(
2680 ; CHECK-NEXT: ret i1 true
2682 %s = lshr exact i4 %x, 2
2683 %c = icmp ult i4 %s, 7
2687 define i1 @lshrult_02_08_exact(i4 %x) {
2688 ; CHECK-LABEL: @lshrult_02_08_exact(
2689 ; CHECK-NEXT: ret i1 true
2691 %s = lshr exact i4 %x, 2
2692 %c = icmp ult i4 %s, 8
2696 define i1 @lshrult_02_09_exact(i4 %x) {
2697 ; CHECK-LABEL: @lshrult_02_09_exact(
2698 ; CHECK-NEXT: ret i1 true
2700 %s = lshr exact i4 %x, 2
2701 %c = icmp ult i4 %s, 9
2705 define i1 @lshrult_02_10_exact(i4 %x) {
2706 ; CHECK-LABEL: @lshrult_02_10_exact(
2707 ; CHECK-NEXT: ret i1 true
2709 %s = lshr exact i4 %x, 2
2710 %c = icmp ult i4 %s, 10
2714 define i1 @lshrult_02_11_exact(i4 %x) {
2715 ; CHECK-LABEL: @lshrult_02_11_exact(
2716 ; CHECK-NEXT: ret i1 true
2718 %s = lshr exact i4 %x, 2
2719 %c = icmp ult i4 %s, 11
2723 define i1 @lshrult_02_12_exact(i4 %x) {
2724 ; CHECK-LABEL: @lshrult_02_12_exact(
2725 ; CHECK-NEXT: ret i1 true
2727 %s = lshr exact i4 %x, 2
2728 %c = icmp ult i4 %s, 12
2732 define i1 @lshrult_02_13_exact(i4 %x) {
2733 ; CHECK-LABEL: @lshrult_02_13_exact(
2734 ; CHECK-NEXT: ret i1 true
2736 %s = lshr exact i4 %x, 2
2737 %c = icmp ult i4 %s, 13
2741 define i1 @lshrult_02_14_exact(i4 %x) {
2742 ; CHECK-LABEL: @lshrult_02_14_exact(
2743 ; CHECK-NEXT: ret i1 true
2745 %s = lshr exact i4 %x, 2
2746 %c = icmp ult i4 %s, 14
2750 define i1 @lshrult_02_15_exact(i4 %x) {
2751 ; CHECK-LABEL: @lshrult_02_15_exact(
2752 ; CHECK-NEXT: ret i1 true
2754 %s = lshr exact i4 %x, 2
2755 %c = icmp ult i4 %s, 15
2759 define i1 @lshrult_03_00_exact(i4 %x) {
2760 ; CHECK-LABEL: @lshrult_03_00_exact(
2761 ; CHECK-NEXT: ret i1 false
2763 %s = lshr exact i4 %x, 3
2764 %c = icmp ult i4 %s, 0
2768 define i1 @lshrult_03_01_exact(i4 %x) {
2769 ; CHECK-LABEL: @lshrult_03_01_exact(
2770 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], -8
2771 ; CHECK-NEXT: ret i1 [[C]]
2773 %s = lshr exact i4 %x, 3
2774 %c = icmp ult i4 %s, 1
2778 define i1 @lshrult_03_02_exact(i4 %x) {
2779 ; CHECK-LABEL: @lshrult_03_02_exact(
2780 ; CHECK-NEXT: ret i1 true
2782 %s = lshr exact i4 %x, 3
2783 %c = icmp ult i4 %s, 2
2787 define i1 @lshrult_03_03_exact(i4 %x) {
2788 ; CHECK-LABEL: @lshrult_03_03_exact(
2789 ; CHECK-NEXT: ret i1 true
2791 %s = lshr exact i4 %x, 3
2792 %c = icmp ult i4 %s, 3
2796 define i1 @lshrult_03_04_exact(i4 %x) {
2797 ; CHECK-LABEL: @lshrult_03_04_exact(
2798 ; CHECK-NEXT: ret i1 true
2800 %s = lshr exact i4 %x, 3
2801 %c = icmp ult i4 %s, 4
2805 define i1 @lshrult_03_05_exact(i4 %x) {
2806 ; CHECK-LABEL: @lshrult_03_05_exact(
2807 ; CHECK-NEXT: ret i1 true
2809 %s = lshr exact i4 %x, 3
2810 %c = icmp ult i4 %s, 5
2814 define i1 @lshrult_03_06_exact(i4 %x) {
2815 ; CHECK-LABEL: @lshrult_03_06_exact(
2816 ; CHECK-NEXT: ret i1 true
2818 %s = lshr exact i4 %x, 3
2819 %c = icmp ult i4 %s, 6
2823 define i1 @lshrult_03_07_exact(i4 %x) {
2824 ; CHECK-LABEL: @lshrult_03_07_exact(
2825 ; CHECK-NEXT: ret i1 true
2827 %s = lshr exact i4 %x, 3
2828 %c = icmp ult i4 %s, 7
2832 define i1 @lshrult_03_08_exact(i4 %x) {
2833 ; CHECK-LABEL: @lshrult_03_08_exact(
2834 ; CHECK-NEXT: ret i1 true
2836 %s = lshr exact i4 %x, 3
2837 %c = icmp ult i4 %s, 8
2841 define i1 @lshrult_03_09_exact(i4 %x) {
2842 ; CHECK-LABEL: @lshrult_03_09_exact(
2843 ; CHECK-NEXT: ret i1 true
2845 %s = lshr exact i4 %x, 3
2846 %c = icmp ult i4 %s, 9
2850 define i1 @lshrult_03_10_exact(i4 %x) {
2851 ; CHECK-LABEL: @lshrult_03_10_exact(
2852 ; CHECK-NEXT: ret i1 true
2854 %s = lshr exact i4 %x, 3
2855 %c = icmp ult i4 %s, 10
2859 define i1 @lshrult_03_11_exact(i4 %x) {
2860 ; CHECK-LABEL: @lshrult_03_11_exact(
2861 ; CHECK-NEXT: ret i1 true
2863 %s = lshr exact i4 %x, 3
2864 %c = icmp ult i4 %s, 11
2868 define i1 @lshrult_03_12_exact(i4 %x) {
2869 ; CHECK-LABEL: @lshrult_03_12_exact(
2870 ; CHECK-NEXT: ret i1 true
2872 %s = lshr exact i4 %x, 3
2873 %c = icmp ult i4 %s, 12
2877 define i1 @lshrult_03_13_exact(i4 %x) {
2878 ; CHECK-LABEL: @lshrult_03_13_exact(
2879 ; CHECK-NEXT: ret i1 true
2881 %s = lshr exact i4 %x, 3
2882 %c = icmp ult i4 %s, 13
2886 define i1 @lshrult_03_14_exact(i4 %x) {
2887 ; CHECK-LABEL: @lshrult_03_14_exact(
2888 ; CHECK-NEXT: ret i1 true
2890 %s = lshr exact i4 %x, 3
2891 %c = icmp ult i4 %s, 14
2895 define i1 @lshrult_03_15_exact(i4 %x) {
2896 ; CHECK-LABEL: @lshrult_03_15_exact(
2897 ; CHECK-NEXT: ret i1 true
2899 %s = lshr exact i4 %x, 3
2900 %c = icmp ult i4 %s, 15
2904 define i1 @ashrsgt_01_00_exact(i4 %x) {
2905 ; CHECK-LABEL: @ashrsgt_01_00_exact(
2906 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 0
2907 ; CHECK-NEXT: ret i1 [[C]]
2909 %s = ashr exact i4 %x, 1
2910 %c = icmp sgt i4 %s, 0
2914 define i1 @ashrsgt_01_01_exact(i4 %x) {
2915 ; CHECK-LABEL: @ashrsgt_01_01_exact(
2916 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 2
2917 ; CHECK-NEXT: ret i1 [[C]]
2919 %s = ashr exact i4 %x, 1
2920 %c = icmp sgt i4 %s, 1
2924 define i1 @ashrsgt_01_02_exact(i4 %x) {
2925 ; CHECK-LABEL: @ashrsgt_01_02_exact(
2926 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 4
2927 ; CHECK-NEXT: ret i1 [[C]]
2929 %s = ashr exact i4 %x, 1
2930 %c = icmp sgt i4 %s, 2
2934 define i1 @ashrsgt_01_03_exact(i4 %x) {
2935 ; CHECK-LABEL: @ashrsgt_01_03_exact(
2936 ; CHECK-NEXT: ret i1 false
2938 %s = ashr exact i4 %x, 1
2939 %c = icmp sgt i4 %s, 3
2943 define i1 @ashrsgt_01_04_exact(i4 %x) {
2944 ; CHECK-LABEL: @ashrsgt_01_04_exact(
2945 ; CHECK-NEXT: ret i1 false
2947 %s = ashr exact i4 %x, 1
2948 %c = icmp sgt i4 %s, 4
2952 define i1 @ashrsgt_01_05_exact(i4 %x) {
2953 ; CHECK-LABEL: @ashrsgt_01_05_exact(
2954 ; CHECK-NEXT: ret i1 false
2956 %s = ashr exact i4 %x, 1
2957 %c = icmp sgt i4 %s, 5
2961 define i1 @ashrsgt_01_06_exact(i4 %x) {
2962 ; CHECK-LABEL: @ashrsgt_01_06_exact(
2963 ; CHECK-NEXT: ret i1 false
2965 %s = ashr exact i4 %x, 1
2966 %c = icmp sgt i4 %s, 6
2970 define i1 @ashrsgt_01_07_exact(i4 %x) {
2971 ; CHECK-LABEL: @ashrsgt_01_07_exact(
2972 ; CHECK-NEXT: ret i1 false
2974 %s = ashr exact i4 %x, 1
2975 %c = icmp sgt i4 %s, 7
2979 define i1 @ashrsgt_01_08_exact(i4 %x) {
2980 ; CHECK-LABEL: @ashrsgt_01_08_exact(
2981 ; CHECK-NEXT: ret i1 true
2983 %s = ashr exact i4 %x, 1
2984 %c = icmp sgt i4 %s, 8
2988 define i1 @ashrsgt_01_09_exact(i4 %x) {
2989 ; CHECK-LABEL: @ashrsgt_01_09_exact(
2990 ; CHECK-NEXT: ret i1 true
2992 %s = ashr exact i4 %x, 1
2993 %c = icmp sgt i4 %s, 9
2997 define i1 @ashrsgt_01_10_exact(i4 %x) {
2998 ; CHECK-LABEL: @ashrsgt_01_10_exact(
2999 ; CHECK-NEXT: ret i1 true
3001 %s = ashr exact i4 %x, 1
3002 %c = icmp sgt i4 %s, 10
3006 define i1 @ashrsgt_01_11_exact(i4 %x) {
3007 ; CHECK-LABEL: @ashrsgt_01_11_exact(
3008 ; CHECK-NEXT: ret i1 true
3010 %s = ashr exact i4 %x, 1
3011 %c = icmp sgt i4 %s, 11
3015 define i1 @ashrsgt_01_12_exact(i4 %x) {
3016 ; CHECK-LABEL: @ashrsgt_01_12_exact(
3017 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], -8
3018 ; CHECK-NEXT: ret i1 [[C]]
3020 %s = ashr exact i4 %x, 1
3021 %c = icmp sgt i4 %s, 12
3025 define i1 @ashrsgt_01_13_exact(i4 %x) {
3026 ; CHECK-LABEL: @ashrsgt_01_13_exact(
3027 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -6
3028 ; CHECK-NEXT: ret i1 [[C]]
3030 %s = ashr exact i4 %x, 1
3031 %c = icmp sgt i4 %s, 13
3035 define i1 @ashrsgt_01_14_exact(i4 %x) {
3036 ; CHECK-LABEL: @ashrsgt_01_14_exact(
3037 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -4
3038 ; CHECK-NEXT: ret i1 [[C]]
3040 %s = ashr exact i4 %x, 1
3041 %c = icmp sgt i4 %s, 14
3045 define i1 @ashrsgt_01_15_exact(i4 %x) {
3046 ; CHECK-LABEL: @ashrsgt_01_15_exact(
3047 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
3048 ; CHECK-NEXT: ret i1 [[C]]
3050 %s = ashr exact i4 %x, 1
3051 %c = icmp sgt i4 %s, 15
3055 define i1 @ashrsgt_02_00_exact(i4 %x) {
3056 ; CHECK-LABEL: @ashrsgt_02_00_exact(
3057 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], 0
3058 ; CHECK-NEXT: ret i1 [[C]]
3060 %s = ashr exact i4 %x, 2
3061 %c = icmp sgt i4 %s, 0
3065 define i1 @ashrsgt_02_01_exact(i4 %x) {
3066 ; CHECK-LABEL: @ashrsgt_02_01_exact(
3067 ; CHECK-NEXT: ret i1 false
3069 %s = ashr exact i4 %x, 2
3070 %c = icmp sgt i4 %s, 1
3074 define i1 @ashrsgt_02_02_exact(i4 %x) {
3075 ; CHECK-LABEL: @ashrsgt_02_02_exact(
3076 ; CHECK-NEXT: ret i1 false
3078 %s = ashr exact i4 %x, 2
3079 %c = icmp sgt i4 %s, 2
3083 define i1 @ashrsgt_02_03_exact(i4 %x) {
3084 ; CHECK-LABEL: @ashrsgt_02_03_exact(
3085 ; CHECK-NEXT: ret i1 false
3087 %s = ashr exact i4 %x, 2
3088 %c = icmp sgt i4 %s, 3
3092 define i1 @ashrsgt_02_04_exact(i4 %x) {
3093 ; CHECK-LABEL: @ashrsgt_02_04_exact(
3094 ; CHECK-NEXT: ret i1 false
3096 %s = ashr exact i4 %x, 2
3097 %c = icmp sgt i4 %s, 4
3101 define i1 @ashrsgt_02_05_exact(i4 %x) {
3102 ; CHECK-LABEL: @ashrsgt_02_05_exact(
3103 ; CHECK-NEXT: ret i1 false
3105 %s = ashr exact i4 %x, 2
3106 %c = icmp sgt i4 %s, 5
3110 define i1 @ashrsgt_02_06_exact(i4 %x) {
3111 ; CHECK-LABEL: @ashrsgt_02_06_exact(
3112 ; CHECK-NEXT: ret i1 false
3114 %s = ashr exact i4 %x, 2
3115 %c = icmp sgt i4 %s, 6
3119 define i1 @ashrsgt_02_07_exact(i4 %x) {
3120 ; CHECK-LABEL: @ashrsgt_02_07_exact(
3121 ; CHECK-NEXT: ret i1 false
3123 %s = ashr exact i4 %x, 2
3124 %c = icmp sgt i4 %s, 7
3128 define i1 @ashrsgt_02_08_exact(i4 %x) {
3129 ; CHECK-LABEL: @ashrsgt_02_08_exact(
3130 ; CHECK-NEXT: ret i1 true
3132 %s = ashr exact i4 %x, 2
3133 %c = icmp sgt i4 %s, 8
3137 define i1 @ashrsgt_02_09_exact(i4 %x) {
3138 ; CHECK-LABEL: @ashrsgt_02_09_exact(
3139 ; CHECK-NEXT: ret i1 true
3141 %s = ashr exact i4 %x, 2
3142 %c = icmp sgt i4 %s, 9
3146 define i1 @ashrsgt_02_10_exact(i4 %x) {
3147 ; CHECK-LABEL: @ashrsgt_02_10_exact(
3148 ; CHECK-NEXT: ret i1 true
3150 %s = ashr exact i4 %x, 2
3151 %c = icmp sgt i4 %s, 10
3155 define i1 @ashrsgt_02_11_exact(i4 %x) {
3156 ; CHECK-LABEL: @ashrsgt_02_11_exact(
3157 ; CHECK-NEXT: ret i1 true
3159 %s = ashr exact i4 %x, 2
3160 %c = icmp sgt i4 %s, 11
3164 define i1 @ashrsgt_02_12_exact(i4 %x) {
3165 ; CHECK-LABEL: @ashrsgt_02_12_exact(
3166 ; CHECK-NEXT: ret i1 true
3168 %s = ashr exact i4 %x, 2
3169 %c = icmp sgt i4 %s, 12
3173 define i1 @ashrsgt_02_13_exact(i4 %x) {
3174 ; CHECK-LABEL: @ashrsgt_02_13_exact(
3175 ; CHECK-NEXT: ret i1 true
3177 %s = ashr exact i4 %x, 2
3178 %c = icmp sgt i4 %s, 13
3182 define i1 @ashrsgt_02_14_exact(i4 %x) {
3183 ; CHECK-LABEL: @ashrsgt_02_14_exact(
3184 ; CHECK-NEXT: [[C:%.*]] = icmp ne i4 [[X:%.*]], -8
3185 ; CHECK-NEXT: ret i1 [[C]]
3187 %s = ashr exact i4 %x, 2
3188 %c = icmp sgt i4 %s, 14
3192 define i1 @ashrsgt_02_15_exact(i4 %x) {
3193 ; CHECK-LABEL: @ashrsgt_02_15_exact(
3194 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
3195 ; CHECK-NEXT: ret i1 [[C]]
3197 %s = ashr exact i4 %x, 2
3198 %c = icmp sgt i4 %s, 15
3202 define i1 @ashrsgt_03_00_exact(i4 %x) {
3203 ; CHECK-LABEL: @ashrsgt_03_00_exact(
3204 ; CHECK-NEXT: ret i1 false
3206 %s = ashr exact i4 %x, 3
3207 %c = icmp sgt i4 %s, 0
3211 define i1 @ashrsgt_03_01_exact(i4 %x) {
3212 ; CHECK-LABEL: @ashrsgt_03_01_exact(
3213 ; CHECK-NEXT: ret i1 false
3215 %s = ashr exact i4 %x, 3
3216 %c = icmp sgt i4 %s, 1
3220 define i1 @ashrsgt_03_02_exact(i4 %x) {
3221 ; CHECK-LABEL: @ashrsgt_03_02_exact(
3222 ; CHECK-NEXT: ret i1 false
3224 %s = ashr exact i4 %x, 3
3225 %c = icmp sgt i4 %s, 2
3229 define i1 @ashrsgt_03_03_exact(i4 %x) {
3230 ; CHECK-LABEL: @ashrsgt_03_03_exact(
3231 ; CHECK-NEXT: ret i1 false
3233 %s = ashr exact i4 %x, 3
3234 %c = icmp sgt i4 %s, 3
3238 define i1 @ashrsgt_03_04_exact(i4 %x) {
3239 ; CHECK-LABEL: @ashrsgt_03_04_exact(
3240 ; CHECK-NEXT: ret i1 false
3242 %s = ashr exact i4 %x, 3
3243 %c = icmp sgt i4 %s, 4
3247 define i1 @ashrsgt_03_05_exact(i4 %x) {
3248 ; CHECK-LABEL: @ashrsgt_03_05_exact(
3249 ; CHECK-NEXT: ret i1 false
3251 %s = ashr exact i4 %x, 3
3252 %c = icmp sgt i4 %s, 5
3256 define i1 @ashrsgt_03_06_exact(i4 %x) {
3257 ; CHECK-LABEL: @ashrsgt_03_06_exact(
3258 ; CHECK-NEXT: ret i1 false
3260 %s = ashr exact i4 %x, 3
3261 %c = icmp sgt i4 %s, 6
3265 define i1 @ashrsgt_03_07_exact(i4 %x) {
3266 ; CHECK-LABEL: @ashrsgt_03_07_exact(
3267 ; CHECK-NEXT: ret i1 false
3269 %s = ashr exact i4 %x, 3
3270 %c = icmp sgt i4 %s, 7
3274 define i1 @ashrsgt_03_08_exact(i4 %x) {
3275 ; CHECK-LABEL: @ashrsgt_03_08_exact(
3276 ; CHECK-NEXT: ret i1 true
3278 %s = ashr exact i4 %x, 3
3279 %c = icmp sgt i4 %s, 8
3283 define i1 @ashrsgt_03_09_exact(i4 %x) {
3284 ; CHECK-LABEL: @ashrsgt_03_09_exact(
3285 ; CHECK-NEXT: ret i1 true
3287 %s = ashr exact i4 %x, 3
3288 %c = icmp sgt i4 %s, 9
3292 define i1 @ashrsgt_03_10_exact(i4 %x) {
3293 ; CHECK-LABEL: @ashrsgt_03_10_exact(
3294 ; CHECK-NEXT: ret i1 true
3296 %s = ashr exact i4 %x, 3
3297 %c = icmp sgt i4 %s, 10
3301 define i1 @ashrsgt_03_11_exact(i4 %x) {
3302 ; CHECK-LABEL: @ashrsgt_03_11_exact(
3303 ; CHECK-NEXT: ret i1 true
3305 %s = ashr exact i4 %x, 3
3306 %c = icmp sgt i4 %s, 11
3310 define i1 @ashrsgt_03_12_exact(i4 %x) {
3311 ; CHECK-LABEL: @ashrsgt_03_12_exact(
3312 ; CHECK-NEXT: ret i1 true
3314 %s = ashr exact i4 %x, 3
3315 %c = icmp sgt i4 %s, 12
3319 define i1 @ashrsgt_03_13_exact(i4 %x) {
3320 ; CHECK-LABEL: @ashrsgt_03_13_exact(
3321 ; CHECK-NEXT: ret i1 true
3323 %s = ashr exact i4 %x, 3
3324 %c = icmp sgt i4 %s, 13
3328 define i1 @ashrsgt_03_14_exact(i4 %x) {
3329 ; CHECK-LABEL: @ashrsgt_03_14_exact(
3330 ; CHECK-NEXT: ret i1 true
3332 %s = ashr exact i4 %x, 3
3333 %c = icmp sgt i4 %s, 14
3337 define i1 @ashrsgt_03_15_exact(i4 %x) {
3338 ; CHECK-LABEL: @ashrsgt_03_15_exact(
3339 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
3340 ; CHECK-NEXT: ret i1 [[C]]
3342 %s = ashr exact i4 %x, 3
3343 %c = icmp sgt i4 %s, 15
3347 define i1 @ashrslt_01_00_exact(i4 %x) {
3348 ; CHECK-LABEL: @ashrslt_01_00_exact(
3349 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
3350 ; CHECK-NEXT: ret i1 [[C]]
3352 %s = ashr exact i4 %x, 1
3353 %c = icmp slt i4 %s, 0
3357 define i1 @ashrslt_01_01_exact(i4 %x) {
3358 ; CHECK-LABEL: @ashrslt_01_01_exact(
3359 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 2
3360 ; CHECK-NEXT: ret i1 [[C]]
3362 %s = ashr exact i4 %x, 1
3363 %c = icmp slt i4 %s, 1
3367 define i1 @ashrslt_01_02_exact(i4 %x) {
3368 ; CHECK-LABEL: @ashrslt_01_02_exact(
3369 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 4
3370 ; CHECK-NEXT: ret i1 [[C]]
3372 %s = ashr exact i4 %x, 1
3373 %c = icmp slt i4 %s, 2
3377 define i1 @ashrslt_01_03_exact(i4 %x) {
3378 ; CHECK-LABEL: @ashrslt_01_03_exact(
3379 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 6
3380 ; CHECK-NEXT: ret i1 [[C]]
3382 %s = ashr exact i4 %x, 1
3383 %c = icmp slt i4 %s, 3
3387 define i1 @ashrslt_01_04_exact(i4 %x) {
3388 ; CHECK-LABEL: @ashrslt_01_04_exact(
3389 ; CHECK-NEXT: ret i1 true
3391 %s = ashr exact i4 %x, 1
3392 %c = icmp slt i4 %s, 4
3396 define i1 @ashrslt_01_05_exact(i4 %x) {
3397 ; CHECK-LABEL: @ashrslt_01_05_exact(
3398 ; CHECK-NEXT: ret i1 true
3400 %s = ashr exact i4 %x, 1
3401 %c = icmp slt i4 %s, 5
3405 define i1 @ashrslt_01_06_exact(i4 %x) {
3406 ; CHECK-LABEL: @ashrslt_01_06_exact(
3407 ; CHECK-NEXT: ret i1 true
3409 %s = ashr exact i4 %x, 1
3410 %c = icmp slt i4 %s, 6
3414 define i1 @ashrslt_01_07_exact(i4 %x) {
3415 ; CHECK-LABEL: @ashrslt_01_07_exact(
3416 ; CHECK-NEXT: ret i1 true
3418 %s = ashr exact i4 %x, 1
3419 %c = icmp slt i4 %s, 7
3423 define i1 @ashrslt_01_08_exact(i4 %x) {
3424 ; CHECK-LABEL: @ashrslt_01_08_exact(
3425 ; CHECK-NEXT: ret i1 false
3427 %s = ashr exact i4 %x, 1
3428 %c = icmp slt i4 %s, 8
3432 define i1 @ashrslt_01_09_exact(i4 %x) {
3433 ; CHECK-LABEL: @ashrslt_01_09_exact(
3434 ; CHECK-NEXT: ret i1 false
3436 %s = ashr exact i4 %x, 1
3437 %c = icmp slt i4 %s, 9
3441 define i1 @ashrslt_01_10_exact(i4 %x) {
3442 ; CHECK-LABEL: @ashrslt_01_10_exact(
3443 ; CHECK-NEXT: ret i1 false
3445 %s = ashr exact i4 %x, 1
3446 %c = icmp slt i4 %s, 10
3450 define i1 @ashrslt_01_11_exact(i4 %x) {
3451 ; CHECK-LABEL: @ashrslt_01_11_exact(
3452 ; CHECK-NEXT: ret i1 false
3454 %s = ashr exact i4 %x, 1
3455 %c = icmp slt i4 %s, 11
3459 define i1 @ashrslt_01_12_exact(i4 %x) {
3460 ; CHECK-LABEL: @ashrslt_01_12_exact(
3461 ; CHECK-NEXT: ret i1 false
3463 %s = ashr exact i4 %x, 1
3464 %c = icmp slt i4 %s, 12
3468 define i1 @ashrslt_01_13_exact(i4 %x) {
3469 ; CHECK-LABEL: @ashrslt_01_13_exact(
3470 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -6
3471 ; CHECK-NEXT: ret i1 [[C]]
3473 %s = ashr exact i4 %x, 1
3474 %c = icmp slt i4 %s, 13
3478 define i1 @ashrslt_01_14_exact(i4 %x) {
3479 ; CHECK-LABEL: @ashrslt_01_14_exact(
3480 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -4
3481 ; CHECK-NEXT: ret i1 [[C]]
3483 %s = ashr exact i4 %x, 1
3484 %c = icmp slt i4 %s, 14
3488 define i1 @ashrslt_01_15_exact(i4 %x) {
3489 ; CHECK-LABEL: @ashrslt_01_15_exact(
3490 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -2
3491 ; CHECK-NEXT: ret i1 [[C]]
3493 %s = ashr exact i4 %x, 1
3494 %c = icmp slt i4 %s, 15
3498 define i1 @ashrslt_02_00_exact(i4 %x) {
3499 ; CHECK-LABEL: @ashrslt_02_00_exact(
3500 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
3501 ; CHECK-NEXT: ret i1 [[C]]
3503 %s = ashr exact i4 %x, 2
3504 %c = icmp slt i4 %s, 0
3508 define i1 @ashrslt_02_01_exact(i4 %x) {
3509 ; CHECK-LABEL: @ashrslt_02_01_exact(
3510 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 4
3511 ; CHECK-NEXT: ret i1 [[C]]
3513 %s = ashr exact i4 %x, 2
3514 %c = icmp slt i4 %s, 1
3518 define i1 @ashrslt_02_02_exact(i4 %x) {
3519 ; CHECK-LABEL: @ashrslt_02_02_exact(
3520 ; CHECK-NEXT: ret i1 true
3522 %s = ashr exact i4 %x, 2
3523 %c = icmp slt i4 %s, 2
3527 define i1 @ashrslt_02_03_exact(i4 %x) {
3528 ; CHECK-LABEL: @ashrslt_02_03_exact(
3529 ; CHECK-NEXT: ret i1 true
3531 %s = ashr exact i4 %x, 2
3532 %c = icmp slt i4 %s, 3
3536 define i1 @ashrslt_02_04_exact(i4 %x) {
3537 ; CHECK-LABEL: @ashrslt_02_04_exact(
3538 ; CHECK-NEXT: ret i1 true
3540 %s = ashr exact i4 %x, 2
3541 %c = icmp slt i4 %s, 4
3545 define i1 @ashrslt_02_05_exact(i4 %x) {
3546 ; CHECK-LABEL: @ashrslt_02_05_exact(
3547 ; CHECK-NEXT: ret i1 true
3549 %s = ashr exact i4 %x, 2
3550 %c = icmp slt i4 %s, 5
3554 define i1 @ashrslt_02_06_exact(i4 %x) {
3555 ; CHECK-LABEL: @ashrslt_02_06_exact(
3556 ; CHECK-NEXT: ret i1 true
3558 %s = ashr exact i4 %x, 2
3559 %c = icmp slt i4 %s, 6
3563 define i1 @ashrslt_02_07_exact(i4 %x) {
3564 ; CHECK-LABEL: @ashrslt_02_07_exact(
3565 ; CHECK-NEXT: ret i1 true
3567 %s = ashr exact i4 %x, 2
3568 %c = icmp slt i4 %s, 7
3572 define i1 @ashrslt_02_08_exact(i4 %x) {
3573 ; CHECK-LABEL: @ashrslt_02_08_exact(
3574 ; CHECK-NEXT: ret i1 false
3576 %s = ashr exact i4 %x, 2
3577 %c = icmp slt i4 %s, 8
3581 define i1 @ashrslt_02_09_exact(i4 %x) {
3582 ; CHECK-LABEL: @ashrslt_02_09_exact(
3583 ; CHECK-NEXT: ret i1 false
3585 %s = ashr exact i4 %x, 2
3586 %c = icmp slt i4 %s, 9
3590 define i1 @ashrslt_02_10_exact(i4 %x) {
3591 ; CHECK-LABEL: @ashrslt_02_10_exact(
3592 ; CHECK-NEXT: ret i1 false
3594 %s = ashr exact i4 %x, 2
3595 %c = icmp slt i4 %s, 10
3599 define i1 @ashrslt_02_11_exact(i4 %x) {
3600 ; CHECK-LABEL: @ashrslt_02_11_exact(
3601 ; CHECK-NEXT: ret i1 false
3603 %s = ashr exact i4 %x, 2
3604 %c = icmp slt i4 %s, 11
3608 define i1 @ashrslt_02_12_exact(i4 %x) {
3609 ; CHECK-LABEL: @ashrslt_02_12_exact(
3610 ; CHECK-NEXT: ret i1 false
3612 %s = ashr exact i4 %x, 2
3613 %c = icmp slt i4 %s, 12
3617 define i1 @ashrslt_02_13_exact(i4 %x) {
3618 ; CHECK-LABEL: @ashrslt_02_13_exact(
3619 ; CHECK-NEXT: ret i1 false
3621 %s = ashr exact i4 %x, 2
3622 %c = icmp slt i4 %s, 13
3626 define i1 @ashrslt_02_14_exact(i4 %x) {
3627 ; CHECK-LABEL: @ashrslt_02_14_exact(
3628 ; CHECK-NEXT: ret i1 false
3630 %s = ashr exact i4 %x, 2
3631 %c = icmp slt i4 %s, 14
3635 define i1 @ashrslt_02_15_exact(i4 %x) {
3636 ; CHECK-LABEL: @ashrslt_02_15_exact(
3637 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], -4
3638 ; CHECK-NEXT: ret i1 [[C]]
3640 %s = ashr exact i4 %x, 2
3641 %c = icmp slt i4 %s, 15
3645 define i1 @ashrslt_03_00_exact(i4 %x) {
3646 ; CHECK-LABEL: @ashrslt_03_00_exact(
3647 ; CHECK-NEXT: [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
3648 ; CHECK-NEXT: ret i1 [[C]]
3650 %s = ashr exact i4 %x, 3
3651 %c = icmp slt i4 %s, 0
3655 define i1 @ashrslt_03_01_exact(i4 %x) {
3656 ; CHECK-LABEL: @ashrslt_03_01_exact(
3657 ; CHECK-NEXT: ret i1 true
3659 %s = ashr exact i4 %x, 3
3660 %c = icmp slt i4 %s, 1
3664 define i1 @ashrslt_03_02_exact(i4 %x) {
3665 ; CHECK-LABEL: @ashrslt_03_02_exact(
3666 ; CHECK-NEXT: ret i1 true
3668 %s = ashr exact i4 %x, 3
3669 %c = icmp slt i4 %s, 2
3673 define i1 @ashrslt_03_03_exact(i4 %x) {
3674 ; CHECK-LABEL: @ashrslt_03_03_exact(
3675 ; CHECK-NEXT: ret i1 true
3677 %s = ashr exact i4 %x, 3
3678 %c = icmp slt i4 %s, 3
3682 define i1 @ashrslt_03_04_exact(i4 %x) {
3683 ; CHECK-LABEL: @ashrslt_03_04_exact(
3684 ; CHECK-NEXT: ret i1 true
3686 %s = ashr exact i4 %x, 3
3687 %c = icmp slt i4 %s, 4
3691 define i1 @ashrslt_03_05_exact(i4 %x) {
3692 ; CHECK-LABEL: @ashrslt_03_05_exact(
3693 ; CHECK-NEXT: ret i1 true
3695 %s = ashr exact i4 %x, 3
3696 %c = icmp slt i4 %s, 5
3700 define i1 @ashrslt_03_06_exact(i4 %x) {
3701 ; CHECK-LABEL: @ashrslt_03_06_exact(
3702 ; CHECK-NEXT: ret i1 true
3704 %s = ashr exact i4 %x, 3
3705 %c = icmp slt i4 %s, 6
3709 define i1 @ashrslt_03_07_exact(i4 %x) {
3710 ; CHECK-LABEL: @ashrslt_03_07_exact(
3711 ; CHECK-NEXT: ret i1 true
3713 %s = ashr exact i4 %x, 3
3714 %c = icmp slt i4 %s, 7
3718 define i1 @ashrslt_03_08_exact(i4 %x) {
3719 ; CHECK-LABEL: @ashrslt_03_08_exact(
3720 ; CHECK-NEXT: ret i1 false
3722 %s = ashr exact i4 %x, 3
3723 %c = icmp slt i4 %s, 8
3727 define i1 @ashrslt_03_09_exact(i4 %x) {
3728 ; CHECK-LABEL: @ashrslt_03_09_exact(
3729 ; CHECK-NEXT: ret i1 false
3731 %s = ashr exact i4 %x, 3
3732 %c = icmp slt i4 %s, 9
3736 define i1 @ashrslt_03_10_exact(i4 %x) {
3737 ; CHECK-LABEL: @ashrslt_03_10_exact(
3738 ; CHECK-NEXT: ret i1 false
3740 %s = ashr exact i4 %x, 3
3741 %c = icmp slt i4 %s, 10
3745 define i1 @ashrslt_03_11_exact(i4 %x) {
3746 ; CHECK-LABEL: @ashrslt_03_11_exact(
3747 ; CHECK-NEXT: ret i1 false
3749 %s = ashr exact i4 %x, 3
3750 %c = icmp slt i4 %s, 11
3754 define i1 @ashrslt_03_12_exact(i4 %x) {
3755 ; CHECK-LABEL: @ashrslt_03_12_exact(
3756 ; CHECK-NEXT: ret i1 false
3758 %s = ashr exact i4 %x, 3
3759 %c = icmp slt i4 %s, 12
3763 define i1 @ashrslt_03_13_exact(i4 %x) {
3764 ; CHECK-LABEL: @ashrslt_03_13_exact(
3765 ; CHECK-NEXT: ret i1 false
3767 %s = ashr exact i4 %x, 3
3768 %c = icmp slt i4 %s, 13
3772 define i1 @ashrslt_03_14_exact(i4 %x) {
3773 ; CHECK-LABEL: @ashrslt_03_14_exact(
3774 ; CHECK-NEXT: ret i1 false
3776 %s = ashr exact i4 %x, 3
3777 %c = icmp slt i4 %s, 14
3781 define i1 @ashrslt_03_15_exact(i4 %x) {
3782 ; CHECK-LABEL: @ashrslt_03_15_exact(
3783 ; CHECK-NEXT: ret i1 false
3785 %s = ashr exact i4 %x, 3
3786 %c = icmp slt i4 %s, 15