1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt < %s -instcombine -S | FileCheck %s
3
4define 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]]
8;
9  %s = lshr i4 %x, 1
10  %c = icmp ugt i4 %s, 0
11  ret i1 %c
12}
13
14define 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]]
18;
19  %s = lshr i4 %x, 1
20  %c = icmp ugt i4 %s, 1
21  ret i1 %c
22}
23
24define 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]]
28;
29  %s = lshr i4 %x, 1
30  %c = icmp ugt i4 %s, 2
31  ret i1 %c
32}
33
34define 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]]
38;
39  %s = lshr i4 %x, 1
40  %c = icmp ugt i4 %s, 3
41  ret i1 %c
42}
43
44define 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]]
48;
49  %s = lshr i4 %x, 1
50  %c = icmp ugt i4 %s, 4
51  ret i1 %c
52}
53
54define 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]]
58;
59  %s = lshr i4 %x, 1
60  %c = icmp ugt i4 %s, 5
61  ret i1 %c
62}
63
64define 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]]
68;
69  %s = lshr i4 %x, 1
70  %c = icmp ugt i4 %s, 6
71  ret i1 %c
72}
73
74define i1 @lshrugt_01_07(i4 %x) {
75; CHECK-LABEL: @lshrugt_01_07(
76; CHECK-NEXT:    ret i1 false
77;
78  %s = lshr i4 %x, 1
79  %c = icmp ugt i4 %s, 7
80  ret i1 %c
81}
82
83define i1 @lshrugt_01_08(i4 %x) {
84; CHECK-LABEL: @lshrugt_01_08(
85; CHECK-NEXT:    ret i1 false
86;
87  %s = lshr i4 %x, 1
88  %c = icmp ugt i4 %s, 8
89  ret i1 %c
90}
91
92define i1 @lshrugt_01_09(i4 %x) {
93; CHECK-LABEL: @lshrugt_01_09(
94; CHECK-NEXT:    ret i1 false
95;
96  %s = lshr i4 %x, 1
97  %c = icmp ugt i4 %s, 9
98  ret i1 %c
99}
100
101define i1 @lshrugt_01_10(i4 %x) {
102; CHECK-LABEL: @lshrugt_01_10(
103; CHECK-NEXT:    ret i1 false
104;
105  %s = lshr i4 %x, 1
106  %c = icmp ugt i4 %s, 10
107  ret i1 %c
108}
109
110define i1 @lshrugt_01_11(i4 %x) {
111; CHECK-LABEL: @lshrugt_01_11(
112; CHECK-NEXT:    ret i1 false
113;
114  %s = lshr i4 %x, 1
115  %c = icmp ugt i4 %s, 11
116  ret i1 %c
117}
118
119define i1 @lshrugt_01_12(i4 %x) {
120; CHECK-LABEL: @lshrugt_01_12(
121; CHECK-NEXT:    ret i1 false
122;
123  %s = lshr i4 %x, 1
124  %c = icmp ugt i4 %s, 12
125  ret i1 %c
126}
127
128define i1 @lshrugt_01_13(i4 %x) {
129; CHECK-LABEL: @lshrugt_01_13(
130; CHECK-NEXT:    ret i1 false
131;
132  %s = lshr i4 %x, 1
133  %c = icmp ugt i4 %s, 13
134  ret i1 %c
135}
136
137define i1 @lshrugt_01_14(i4 %x) {
138; CHECK-LABEL: @lshrugt_01_14(
139; CHECK-NEXT:    ret i1 false
140;
141  %s = lshr i4 %x, 1
142  %c = icmp ugt i4 %s, 14
143  ret i1 %c
144}
145
146define i1 @lshrugt_01_15(i4 %x) {
147; CHECK-LABEL: @lshrugt_01_15(
148; CHECK-NEXT:    ret i1 false
149;
150  %s = lshr i4 %x, 1
151  %c = icmp ugt i4 %s, 15
152  ret i1 %c
153}
154
155define 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]]
159;
160  %s = lshr i4 %x, 2
161  %c = icmp ugt i4 %s, 0
162  ret i1 %c
163}
164
165define 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]]
169;
170  %s = lshr i4 %x, 2
171  %c = icmp ugt i4 %s, 1
172  ret i1 %c
173}
174
175define 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]]
179;
180  %s = lshr i4 %x, 2
181  %c = icmp ugt i4 %s, 2
182  ret i1 %c
183}
184
185define i1 @lshrugt_02_03(i4 %x) {
186; CHECK-LABEL: @lshrugt_02_03(
187; CHECK-NEXT:    ret i1 false
188;
189  %s = lshr i4 %x, 2
190  %c = icmp ugt i4 %s, 3
191  ret i1 %c
192}
193
194define i1 @lshrugt_02_04(i4 %x) {
195; CHECK-LABEL: @lshrugt_02_04(
196; CHECK-NEXT:    ret i1 false
197;
198  %s = lshr i4 %x, 2
199  %c = icmp ugt i4 %s, 4
200  ret i1 %c
201}
202
203define i1 @lshrugt_02_05(i4 %x) {
204; CHECK-LABEL: @lshrugt_02_05(
205; CHECK-NEXT:    ret i1 false
206;
207  %s = lshr i4 %x, 2
208  %c = icmp ugt i4 %s, 5
209  ret i1 %c
210}
211
212define i1 @lshrugt_02_06(i4 %x) {
213; CHECK-LABEL: @lshrugt_02_06(
214; CHECK-NEXT:    ret i1 false
215;
216  %s = lshr i4 %x, 2
217  %c = icmp ugt i4 %s, 6
218  ret i1 %c
219}
220
221define i1 @lshrugt_02_07(i4 %x) {
222; CHECK-LABEL: @lshrugt_02_07(
223; CHECK-NEXT:    ret i1 false
224;
225  %s = lshr i4 %x, 2
226  %c = icmp ugt i4 %s, 7
227  ret i1 %c
228}
229
230define i1 @lshrugt_02_08(i4 %x) {
231; CHECK-LABEL: @lshrugt_02_08(
232; CHECK-NEXT:    ret i1 false
233;
234  %s = lshr i4 %x, 2
235  %c = icmp ugt i4 %s, 8
236  ret i1 %c
237}
238
239define i1 @lshrugt_02_09(i4 %x) {
240; CHECK-LABEL: @lshrugt_02_09(
241; CHECK-NEXT:    ret i1 false
242;
243  %s = lshr i4 %x, 2
244  %c = icmp ugt i4 %s, 9
245  ret i1 %c
246}
247
248define i1 @lshrugt_02_10(i4 %x) {
249; CHECK-LABEL: @lshrugt_02_10(
250; CHECK-NEXT:    ret i1 false
251;
252  %s = lshr i4 %x, 2
253  %c = icmp ugt i4 %s, 10
254  ret i1 %c
255}
256
257define i1 @lshrugt_02_11(i4 %x) {
258; CHECK-LABEL: @lshrugt_02_11(
259; CHECK-NEXT:    ret i1 false
260;
261  %s = lshr i4 %x, 2
262  %c = icmp ugt i4 %s, 11
263  ret i1 %c
264}
265
266define i1 @lshrugt_02_12(i4 %x) {
267; CHECK-LABEL: @lshrugt_02_12(
268; CHECK-NEXT:    ret i1 false
269;
270  %s = lshr i4 %x, 2
271  %c = icmp ugt i4 %s, 12
272  ret i1 %c
273}
274
275define i1 @lshrugt_02_13(i4 %x) {
276; CHECK-LABEL: @lshrugt_02_13(
277; CHECK-NEXT:    ret i1 false
278;
279  %s = lshr i4 %x, 2
280  %c = icmp ugt i4 %s, 13
281  ret i1 %c
282}
283
284define i1 @lshrugt_02_14(i4 %x) {
285; CHECK-LABEL: @lshrugt_02_14(
286; CHECK-NEXT:    ret i1 false
287;
288  %s = lshr i4 %x, 2
289  %c = icmp ugt i4 %s, 14
290  ret i1 %c
291}
292
293define i1 @lshrugt_02_15(i4 %x) {
294; CHECK-LABEL: @lshrugt_02_15(
295; CHECK-NEXT:    ret i1 false
296;
297  %s = lshr i4 %x, 2
298  %c = icmp ugt i4 %s, 15
299  ret i1 %c
300}
301
302define 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]]
306;
307  %s = lshr i4 %x, 3
308  %c = icmp ugt i4 %s, 0
309  ret i1 %c
310}
311
312define i1 @lshrugt_03_01(i4 %x) {
313; CHECK-LABEL: @lshrugt_03_01(
314; CHECK-NEXT:    ret i1 false
315;
316  %s = lshr i4 %x, 3
317  %c = icmp ugt i4 %s, 1
318  ret i1 %c
319}
320
321define i1 @lshrugt_03_02(i4 %x) {
322; CHECK-LABEL: @lshrugt_03_02(
323; CHECK-NEXT:    ret i1 false
324;
325  %s = lshr i4 %x, 3
326  %c = icmp ugt i4 %s, 2
327  ret i1 %c
328}
329
330define i1 @lshrugt_03_03(i4 %x) {
331; CHECK-LABEL: @lshrugt_03_03(
332; CHECK-NEXT:    ret i1 false
333;
334  %s = lshr i4 %x, 3
335  %c = icmp ugt i4 %s, 3
336  ret i1 %c
337}
338
339define i1 @lshrugt_03_04(i4 %x) {
340; CHECK-LABEL: @lshrugt_03_04(
341; CHECK-NEXT:    ret i1 false
342;
343  %s = lshr i4 %x, 3
344  %c = icmp ugt i4 %s, 4
345  ret i1 %c
346}
347
348define i1 @lshrugt_03_05(i4 %x) {
349; CHECK-LABEL: @lshrugt_03_05(
350; CHECK-NEXT:    ret i1 false
351;
352  %s = lshr i4 %x, 3
353  %c = icmp ugt i4 %s, 5
354  ret i1 %c
355}
356
357define i1 @lshrugt_03_06(i4 %x) {
358; CHECK-LABEL: @lshrugt_03_06(
359; CHECK-NEXT:    ret i1 false
360;
361  %s = lshr i4 %x, 3
362  %c = icmp ugt i4 %s, 6
363  ret i1 %c
364}
365
366define i1 @lshrugt_03_07(i4 %x) {
367; CHECK-LABEL: @lshrugt_03_07(
368; CHECK-NEXT:    ret i1 false
369;
370  %s = lshr i4 %x, 3
371  %c = icmp ugt i4 %s, 7
372  ret i1 %c
373}
374
375define i1 @lshrugt_03_08(i4 %x) {
376; CHECK-LABEL: @lshrugt_03_08(
377; CHECK-NEXT:    ret i1 false
378;
379  %s = lshr i4 %x, 3
380  %c = icmp ugt i4 %s, 8
381  ret i1 %c
382}
383
384define i1 @lshrugt_03_09(i4 %x) {
385; CHECK-LABEL: @lshrugt_03_09(
386; CHECK-NEXT:    ret i1 false
387;
388  %s = lshr i4 %x, 3
389  %c = icmp ugt i4 %s, 9
390  ret i1 %c
391}
392
393define i1 @lshrugt_03_10(i4 %x) {
394; CHECK-LABEL: @lshrugt_03_10(
395; CHECK-NEXT:    ret i1 false
396;
397  %s = lshr i4 %x, 3
398  %c = icmp ugt i4 %s, 10
399  ret i1 %c
400}
401
402define i1 @lshrugt_03_11(i4 %x) {
403; CHECK-LABEL: @lshrugt_03_11(
404; CHECK-NEXT:    ret i1 false
405;
406  %s = lshr i4 %x, 3
407  %c = icmp ugt i4 %s, 11
408  ret i1 %c
409}
410
411define i1 @lshrugt_03_12(i4 %x) {
412; CHECK-LABEL: @lshrugt_03_12(
413; CHECK-NEXT:    ret i1 false
414;
415  %s = lshr i4 %x, 3
416  %c = icmp ugt i4 %s, 12
417  ret i1 %c
418}
419
420define i1 @lshrugt_03_13(i4 %x) {
421; CHECK-LABEL: @lshrugt_03_13(
422; CHECK-NEXT:    ret i1 false
423;
424  %s = lshr i4 %x, 3
425  %c = icmp ugt i4 %s, 13
426  ret i1 %c
427}
428
429define i1 @lshrugt_03_14(i4 %x) {
430; CHECK-LABEL: @lshrugt_03_14(
431; CHECK-NEXT:    ret i1 false
432;
433  %s = lshr i4 %x, 3
434  %c = icmp ugt i4 %s, 14
435  ret i1 %c
436}
437
438define i1 @lshrugt_03_15(i4 %x) {
439; CHECK-LABEL: @lshrugt_03_15(
440; CHECK-NEXT:    ret i1 false
441;
442  %s = lshr i4 %x, 3
443  %c = icmp ugt i4 %s, 15
444  ret i1 %c
445}
446
447define i1 @lshrult_01_00(i4 %x) {
448; CHECK-LABEL: @lshrult_01_00(
449; CHECK-NEXT:    ret i1 false
450;
451  %s = lshr i4 %x, 1
452  %c = icmp ult i4 %s, 0
453  ret i1 %c
454}
455
456define 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]]
460;
461  %s = lshr i4 %x, 1
462  %c = icmp ult i4 %s, 1
463  ret i1 %c
464}
465
466define 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]]
470;
471  %s = lshr i4 %x, 1
472  %c = icmp ult i4 %s, 2
473  ret i1 %c
474}
475
476define 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]]
480;
481  %s = lshr i4 %x, 1
482  %c = icmp ult i4 %s, 3
483  ret i1 %c
484}
485
486define 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]]
490;
491  %s = lshr i4 %x, 1
492  %c = icmp ult i4 %s, 4
493  ret i1 %c
494}
495
496define 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]]
500;
501  %s = lshr i4 %x, 1
502  %c = icmp ult i4 %s, 5
503  ret i1 %c
504}
505
506define 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]]
510;
511  %s = lshr i4 %x, 1
512  %c = icmp ult i4 %s, 6
513  ret i1 %c
514}
515
516define 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]]
520;
521  %s = lshr i4 %x, 1
522  %c = icmp ult i4 %s, 7
523  ret i1 %c
524}
525
526define i1 @lshrult_01_08(i4 %x) {
527; CHECK-LABEL: @lshrult_01_08(
528; CHECK-NEXT:    ret i1 true
529;
530  %s = lshr i4 %x, 1
531  %c = icmp ult i4 %s, 8
532  ret i1 %c
533}
534
535define i1 @lshrult_01_09(i4 %x) {
536; CHECK-LABEL: @lshrult_01_09(
537; CHECK-NEXT:    ret i1 true
538;
539  %s = lshr i4 %x, 1
540  %c = icmp ult i4 %s, 9
541  ret i1 %c
542}
543
544define i1 @lshrult_01_10(i4 %x) {
545; CHECK-LABEL: @lshrult_01_10(
546; CHECK-NEXT:    ret i1 true
547;
548  %s = lshr i4 %x, 1
549  %c = icmp ult i4 %s, 10
550  ret i1 %c
551}
552
553define i1 @lshrult_01_11(i4 %x) {
554; CHECK-LABEL: @lshrult_01_11(
555; CHECK-NEXT:    ret i1 true
556;
557  %s = lshr i4 %x, 1
558  %c = icmp ult i4 %s, 11
559  ret i1 %c
560}
561
562define i1 @lshrult_01_12(i4 %x) {
563; CHECK-LABEL: @lshrult_01_12(
564; CHECK-NEXT:    ret i1 true
565;
566  %s = lshr i4 %x, 1
567  %c = icmp ult i4 %s, 12
568  ret i1 %c
569}
570
571define i1 @lshrult_01_13(i4 %x) {
572; CHECK-LABEL: @lshrult_01_13(
573; CHECK-NEXT:    ret i1 true
574;
575  %s = lshr i4 %x, 1
576  %c = icmp ult i4 %s, 13
577  ret i1 %c
578}
579
580define i1 @lshrult_01_14(i4 %x) {
581; CHECK-LABEL: @lshrult_01_14(
582; CHECK-NEXT:    ret i1 true
583;
584  %s = lshr i4 %x, 1
585  %c = icmp ult i4 %s, 14
586  ret i1 %c
587}
588
589define i1 @lshrult_01_15(i4 %x) {
590; CHECK-LABEL: @lshrult_01_15(
591; CHECK-NEXT:    ret i1 true
592;
593  %s = lshr i4 %x, 1
594  %c = icmp ult i4 %s, 15
595  ret i1 %c
596}
597
598define i1 @lshrult_02_00(i4 %x) {
599; CHECK-LABEL: @lshrult_02_00(
600; CHECK-NEXT:    ret i1 false
601;
602  %s = lshr i4 %x, 2
603  %c = icmp ult i4 %s, 0
604  ret i1 %c
605}
606
607define 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]]
611;
612  %s = lshr i4 %x, 2
613  %c = icmp ult i4 %s, 1
614  ret i1 %c
615}
616
617define 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]]
621;
622  %s = lshr i4 %x, 2
623  %c = icmp ult i4 %s, 2
624  ret i1 %c
625}
626
627define 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]]
631;
632  %s = lshr i4 %x, 2
633  %c = icmp ult i4 %s, 3
634  ret i1 %c
635}
636
637define i1 @lshrult_02_04(i4 %x) {
638; CHECK-LABEL: @lshrult_02_04(
639; CHECK-NEXT:    ret i1 true
640;
641  %s = lshr i4 %x, 2
642  %c = icmp ult i4 %s, 4
643  ret i1 %c
644}
645
646define i1 @lshrult_02_05(i4 %x) {
647; CHECK-LABEL: @lshrult_02_05(
648; CHECK-NEXT:    ret i1 true
649;
650  %s = lshr i4 %x, 2
651  %c = icmp ult i4 %s, 5
652  ret i1 %c
653}
654
655define i1 @lshrult_02_06(i4 %x) {
656; CHECK-LABEL: @lshrult_02_06(
657; CHECK-NEXT:    ret i1 true
658;
659  %s = lshr i4 %x, 2
660  %c = icmp ult i4 %s, 6
661  ret i1 %c
662}
663
664define i1 @lshrult_02_07(i4 %x) {
665; CHECK-LABEL: @lshrult_02_07(
666; CHECK-NEXT:    ret i1 true
667;
668  %s = lshr i4 %x, 2
669  %c = icmp ult i4 %s, 7
670  ret i1 %c
671}
672
673define i1 @lshrult_02_08(i4 %x) {
674; CHECK-LABEL: @lshrult_02_08(
675; CHECK-NEXT:    ret i1 true
676;
677  %s = lshr i4 %x, 2
678  %c = icmp ult i4 %s, 8
679  ret i1 %c
680}
681
682define i1 @lshrult_02_09(i4 %x) {
683; CHECK-LABEL: @lshrult_02_09(
684; CHECK-NEXT:    ret i1 true
685;
686  %s = lshr i4 %x, 2
687  %c = icmp ult i4 %s, 9
688  ret i1 %c
689}
690
691define i1 @lshrult_02_10(i4 %x) {
692; CHECK-LABEL: @lshrult_02_10(
693; CHECK-NEXT:    ret i1 true
694;
695  %s = lshr i4 %x, 2
696  %c = icmp ult i4 %s, 10
697  ret i1 %c
698}
699
700define i1 @lshrult_02_11(i4 %x) {
701; CHECK-LABEL: @lshrult_02_11(
702; CHECK-NEXT:    ret i1 true
703;
704  %s = lshr i4 %x, 2
705  %c = icmp ult i4 %s, 11
706  ret i1 %c
707}
708
709define i1 @lshrult_02_12(i4 %x) {
710; CHECK-LABEL: @lshrult_02_12(
711; CHECK-NEXT:    ret i1 true
712;
713  %s = lshr i4 %x, 2
714  %c = icmp ult i4 %s, 12
715  ret i1 %c
716}
717
718define i1 @lshrult_02_13(i4 %x) {
719; CHECK-LABEL: @lshrult_02_13(
720; CHECK-NEXT:    ret i1 true
721;
722  %s = lshr i4 %x, 2
723  %c = icmp ult i4 %s, 13
724  ret i1 %c
725}
726
727define i1 @lshrult_02_14(i4 %x) {
728; CHECK-LABEL: @lshrult_02_14(
729; CHECK-NEXT:    ret i1 true
730;
731  %s = lshr i4 %x, 2
732  %c = icmp ult i4 %s, 14
733  ret i1 %c
734}
735
736define i1 @lshrult_02_15(i4 %x) {
737; CHECK-LABEL: @lshrult_02_15(
738; CHECK-NEXT:    ret i1 true
739;
740  %s = lshr i4 %x, 2
741  %c = icmp ult i4 %s, 15
742  ret i1 %c
743}
744
745define i1 @lshrult_03_00(i4 %x) {
746; CHECK-LABEL: @lshrult_03_00(
747; CHECK-NEXT:    ret i1 false
748;
749  %s = lshr i4 %x, 3
750  %c = icmp ult i4 %s, 0
751  ret i1 %c
752}
753
754define 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]]
758;
759  %s = lshr i4 %x, 3
760  %c = icmp ult i4 %s, 1
761  ret i1 %c
762}
763
764define i1 @lshrult_03_02(i4 %x) {
765; CHECK-LABEL: @lshrult_03_02(
766; CHECK-NEXT:    ret i1 true
767;
768  %s = lshr i4 %x, 3
769  %c = icmp ult i4 %s, 2
770  ret i1 %c
771}
772
773define i1 @lshrult_03_03(i4 %x) {
774; CHECK-LABEL: @lshrult_03_03(
775; CHECK-NEXT:    ret i1 true
776;
777  %s = lshr i4 %x, 3
778  %c = icmp ult i4 %s, 3
779  ret i1 %c
780}
781
782define i1 @lshrult_03_04(i4 %x) {
783; CHECK-LABEL: @lshrult_03_04(
784; CHECK-NEXT:    ret i1 true
785;
786  %s = lshr i4 %x, 3
787  %c = icmp ult i4 %s, 4
788  ret i1 %c
789}
790
791define i1 @lshrult_03_05(i4 %x) {
792; CHECK-LABEL: @lshrult_03_05(
793; CHECK-NEXT:    ret i1 true
794;
795  %s = lshr i4 %x, 3
796  %c = icmp ult i4 %s, 5
797  ret i1 %c
798}
799
800define i1 @lshrult_03_06(i4 %x) {
801; CHECK-LABEL: @lshrult_03_06(
802; CHECK-NEXT:    ret i1 true
803;
804  %s = lshr i4 %x, 3
805  %c = icmp ult i4 %s, 6
806  ret i1 %c
807}
808
809define i1 @lshrult_03_07(i4 %x) {
810; CHECK-LABEL: @lshrult_03_07(
811; CHECK-NEXT:    ret i1 true
812;
813  %s = lshr i4 %x, 3
814  %c = icmp ult i4 %s, 7
815  ret i1 %c
816}
817
818define i1 @lshrult_03_08(i4 %x) {
819; CHECK-LABEL: @lshrult_03_08(
820; CHECK-NEXT:    ret i1 true
821;
822  %s = lshr i4 %x, 3
823  %c = icmp ult i4 %s, 8
824  ret i1 %c
825}
826
827define i1 @lshrult_03_09(i4 %x) {
828; CHECK-LABEL: @lshrult_03_09(
829; CHECK-NEXT:    ret i1 true
830;
831  %s = lshr i4 %x, 3
832  %c = icmp ult i4 %s, 9
833  ret i1 %c
834}
835
836define i1 @lshrult_03_10(i4 %x) {
837; CHECK-LABEL: @lshrult_03_10(
838; CHECK-NEXT:    ret i1 true
839;
840  %s = lshr i4 %x, 3
841  %c = icmp ult i4 %s, 10
842  ret i1 %c
843}
844
845define i1 @lshrult_03_11(i4 %x) {
846; CHECK-LABEL: @lshrult_03_11(
847; CHECK-NEXT:    ret i1 true
848;
849  %s = lshr i4 %x, 3
850  %c = icmp ult i4 %s, 11
851  ret i1 %c
852}
853
854define i1 @lshrult_03_12(i4 %x) {
855; CHECK-LABEL: @lshrult_03_12(
856; CHECK-NEXT:    ret i1 true
857;
858  %s = lshr i4 %x, 3
859  %c = icmp ult i4 %s, 12
860  ret i1 %c
861}
862
863define i1 @lshrult_03_13(i4 %x) {
864; CHECK-LABEL: @lshrult_03_13(
865; CHECK-NEXT:    ret i1 true
866;
867  %s = lshr i4 %x, 3
868  %c = icmp ult i4 %s, 13
869  ret i1 %c
870}
871
872define i1 @lshrult_03_14(i4 %x) {
873; CHECK-LABEL: @lshrult_03_14(
874; CHECK-NEXT:    ret i1 true
875;
876  %s = lshr i4 %x, 3
877  %c = icmp ult i4 %s, 14
878  ret i1 %c
879}
880
881define i1 @lshrult_03_15(i4 %x) {
882; CHECK-LABEL: @lshrult_03_15(
883; CHECK-NEXT:    ret i1 true
884;
885  %s = lshr i4 %x, 3
886  %c = icmp ult i4 %s, 15
887  ret i1 %c
888}
889
890define 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]]
894;
895  %s = ashr i4 %x, 1
896  %c = icmp sgt i4 %s, 0
897  ret i1 %c
898}
899
900define 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]]
904;
905  %s = ashr i4 %x, 1
906  %c = icmp sgt i4 %s, 1
907  ret i1 %c
908}
909
910define 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]]
914;
915  %s = ashr i4 %x, 1
916  %c = icmp sgt i4 %s, 2
917  ret i1 %c
918}
919
920define i1 @ashrsgt_01_03(i4 %x) {
921; CHECK-LABEL: @ashrsgt_01_03(
922; CHECK-NEXT:    ret i1 false
923;
924  %s = ashr i4 %x, 1
925  %c = icmp sgt i4 %s, 3
926  ret i1 %c
927}
928
929define i1 @ashrsgt_01_04(i4 %x) {
930; CHECK-LABEL: @ashrsgt_01_04(
931; CHECK-NEXT:    ret i1 false
932;
933  %s = ashr i4 %x, 1
934  %c = icmp sgt i4 %s, 4
935  ret i1 %c
936}
937
938define i1 @ashrsgt_01_05(i4 %x) {
939; CHECK-LABEL: @ashrsgt_01_05(
940; CHECK-NEXT:    ret i1 false
941;
942  %s = ashr i4 %x, 1
943  %c = icmp sgt i4 %s, 5
944  ret i1 %c
945}
946
947define i1 @ashrsgt_01_06(i4 %x) {
948; CHECK-LABEL: @ashrsgt_01_06(
949; CHECK-NEXT:    ret i1 false
950;
951  %s = ashr i4 %x, 1
952  %c = icmp sgt i4 %s, 6
953  ret i1 %c
954}
955
956define i1 @ashrsgt_01_07(i4 %x) {
957; CHECK-LABEL: @ashrsgt_01_07(
958; CHECK-NEXT:    ret i1 false
959;
960  %s = ashr i4 %x, 1
961  %c = icmp sgt i4 %s, 7
962  ret i1 %c
963}
964
965define i1 @ashrsgt_01_08(i4 %x) {
966; CHECK-LABEL: @ashrsgt_01_08(
967; CHECK-NEXT:    ret i1 true
968;
969  %s = ashr i4 %x, 1
970  %c = icmp sgt i4 %s, 8
971  ret i1 %c
972}
973
974define i1 @ashrsgt_01_09(i4 %x) {
975; CHECK-LABEL: @ashrsgt_01_09(
976; CHECK-NEXT:    ret i1 true
977;
978  %s = ashr i4 %x, 1
979  %c = icmp sgt i4 %s, 9
980  ret i1 %c
981}
982
983define i1 @ashrsgt_01_10(i4 %x) {
984; CHECK-LABEL: @ashrsgt_01_10(
985; CHECK-NEXT:    ret i1 true
986;
987  %s = ashr i4 %x, 1
988  %c = icmp sgt i4 %s, 10
989  ret i1 %c
990}
991
992define i1 @ashrsgt_01_11(i4 %x) {
993; CHECK-LABEL: @ashrsgt_01_11(
994; CHECK-NEXT:    ret i1 true
995;
996  %s = ashr i4 %x, 1
997  %c = icmp sgt i4 %s, 11
998  ret i1 %c
999}
1000
1001define 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]]
1005;
1006  %s = ashr i4 %x, 1
1007  %c = icmp sgt i4 %s, 12
1008  ret i1 %c
1009}
1010
1011define 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]]
1015;
1016  %s = ashr i4 %x, 1
1017  %c = icmp sgt i4 %s, 13
1018  ret i1 %c
1019}
1020
1021define 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]]
1025;
1026  %s = ashr i4 %x, 1
1027  %c = icmp sgt i4 %s, 14
1028  ret i1 %c
1029}
1030
1031define 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]]
1035;
1036  %s = ashr i4 %x, 1
1037  %c = icmp sgt i4 %s, 15
1038  ret i1 %c
1039}
1040
1041define 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]]
1045;
1046  %s = ashr i4 %x, 2
1047  %c = icmp sgt i4 %s, 0
1048  ret i1 %c
1049}
1050
1051define i1 @ashrsgt_02_01(i4 %x) {
1052; CHECK-LABEL: @ashrsgt_02_01(
1053; CHECK-NEXT:    ret i1 false
1054;
1055  %s = ashr i4 %x, 2
1056  %c = icmp sgt i4 %s, 1
1057  ret i1 %c
1058}
1059
1060define i1 @ashrsgt_02_02(i4 %x) {
1061; CHECK-LABEL: @ashrsgt_02_02(
1062; CHECK-NEXT:    ret i1 false
1063;
1064  %s = ashr i4 %x, 2
1065  %c = icmp sgt i4 %s, 2
1066  ret i1 %c
1067}
1068
1069define i1 @ashrsgt_02_03(i4 %x) {
1070; CHECK-LABEL: @ashrsgt_02_03(
1071; CHECK-NEXT:    ret i1 false
1072;
1073  %s = ashr i4 %x, 2
1074  %c = icmp sgt i4 %s, 3
1075  ret i1 %c
1076}
1077
1078define i1 @ashrsgt_02_04(i4 %x) {
1079; CHECK-LABEL: @ashrsgt_02_04(
1080; CHECK-NEXT:    ret i1 false
1081;
1082  %s = ashr i4 %x, 2
1083  %c = icmp sgt i4 %s, 4
1084  ret i1 %c
1085}
1086
1087define i1 @ashrsgt_02_05(i4 %x) {
1088; CHECK-LABEL: @ashrsgt_02_05(
1089; CHECK-NEXT:    ret i1 false
1090;
1091  %s = ashr i4 %x, 2
1092  %c = icmp sgt i4 %s, 5
1093  ret i1 %c
1094}
1095
1096define i1 @ashrsgt_02_06(i4 %x) {
1097; CHECK-LABEL: @ashrsgt_02_06(
1098; CHECK-NEXT:    ret i1 false
1099;
1100  %s = ashr i4 %x, 2
1101  %c = icmp sgt i4 %s, 6
1102  ret i1 %c
1103}
1104
1105define i1 @ashrsgt_02_07(i4 %x) {
1106; CHECK-LABEL: @ashrsgt_02_07(
1107; CHECK-NEXT:    ret i1 false
1108;
1109  %s = ashr i4 %x, 2
1110  %c = icmp sgt i4 %s, 7
1111  ret i1 %c
1112}
1113
1114define i1 @ashrsgt_02_08(i4 %x) {
1115; CHECK-LABEL: @ashrsgt_02_08(
1116; CHECK-NEXT:    ret i1 true
1117;
1118  %s = ashr i4 %x, 2
1119  %c = icmp sgt i4 %s, 8
1120  ret i1 %c
1121}
1122
1123define i1 @ashrsgt_02_09(i4 %x) {
1124; CHECK-LABEL: @ashrsgt_02_09(
1125; CHECK-NEXT:    ret i1 true
1126;
1127  %s = ashr i4 %x, 2
1128  %c = icmp sgt i4 %s, 9
1129  ret i1 %c
1130}
1131
1132define i1 @ashrsgt_02_10(i4 %x) {
1133; CHECK-LABEL: @ashrsgt_02_10(
1134; CHECK-NEXT:    ret i1 true
1135;
1136  %s = ashr i4 %x, 2
1137  %c = icmp sgt i4 %s, 10
1138  ret i1 %c
1139}
1140
1141define i1 @ashrsgt_02_11(i4 %x) {
1142; CHECK-LABEL: @ashrsgt_02_11(
1143; CHECK-NEXT:    ret i1 true
1144;
1145  %s = ashr i4 %x, 2
1146  %c = icmp sgt i4 %s, 11
1147  ret i1 %c
1148}
1149
1150define i1 @ashrsgt_02_12(i4 %x) {
1151; CHECK-LABEL: @ashrsgt_02_12(
1152; CHECK-NEXT:    ret i1 true
1153;
1154  %s = ashr i4 %x, 2
1155  %c = icmp sgt i4 %s, 12
1156  ret i1 %c
1157}
1158
1159define i1 @ashrsgt_02_13(i4 %x) {
1160; CHECK-LABEL: @ashrsgt_02_13(
1161; CHECK-NEXT:    ret i1 true
1162;
1163  %s = ashr i4 %x, 2
1164  %c = icmp sgt i4 %s, 13
1165  ret i1 %c
1166}
1167
1168define 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]]
1172;
1173  %s = ashr i4 %x, 2
1174  %c = icmp sgt i4 %s, 14
1175  ret i1 %c
1176}
1177
1178define 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]]
1182;
1183  %s = ashr i4 %x, 2
1184  %c = icmp sgt i4 %s, 15
1185  ret i1 %c
1186}
1187
1188define i1 @ashrsgt_03_00(i4 %x) {
1189; CHECK-LABEL: @ashrsgt_03_00(
1190; CHECK-NEXT:    ret i1 false
1191;
1192  %s = ashr i4 %x, 3
1193  %c = icmp sgt i4 %s, 0
1194  ret i1 %c
1195}
1196
1197define i1 @ashrsgt_03_01(i4 %x) {
1198; CHECK-LABEL: @ashrsgt_03_01(
1199; CHECK-NEXT:    ret i1 false
1200;
1201  %s = ashr i4 %x, 3
1202  %c = icmp sgt i4 %s, 1
1203  ret i1 %c
1204}
1205
1206define i1 @ashrsgt_03_02(i4 %x) {
1207; CHECK-LABEL: @ashrsgt_03_02(
1208; CHECK-NEXT:    ret i1 false
1209;
1210  %s = ashr i4 %x, 3
1211  %c = icmp sgt i4 %s, 2
1212  ret i1 %c
1213}
1214
1215define i1 @ashrsgt_03_03(i4 %x) {
1216; CHECK-LABEL: @ashrsgt_03_03(
1217; CHECK-NEXT:    ret i1 false
1218;
1219  %s = ashr i4 %x, 3
1220  %c = icmp sgt i4 %s, 3
1221  ret i1 %c
1222}
1223
1224define i1 @ashrsgt_03_04(i4 %x) {
1225; CHECK-LABEL: @ashrsgt_03_04(
1226; CHECK-NEXT:    ret i1 false
1227;
1228  %s = ashr i4 %x, 3
1229  %c = icmp sgt i4 %s, 4
1230  ret i1 %c
1231}
1232
1233define i1 @ashrsgt_03_05(i4 %x) {
1234; CHECK-LABEL: @ashrsgt_03_05(
1235; CHECK-NEXT:    ret i1 false
1236;
1237  %s = ashr i4 %x, 3
1238  %c = icmp sgt i4 %s, 5
1239  ret i1 %c
1240}
1241
1242define i1 @ashrsgt_03_06(i4 %x) {
1243; CHECK-LABEL: @ashrsgt_03_06(
1244; CHECK-NEXT:    ret i1 false
1245;
1246  %s = ashr i4 %x, 3
1247  %c = icmp sgt i4 %s, 6
1248  ret i1 %c
1249}
1250
1251define i1 @ashrsgt_03_07(i4 %x) {
1252; CHECK-LABEL: @ashrsgt_03_07(
1253; CHECK-NEXT:    ret i1 false
1254;
1255  %s = ashr i4 %x, 3
1256  %c = icmp sgt i4 %s, 7
1257  ret i1 %c
1258}
1259
1260define i1 @ashrsgt_03_08(i4 %x) {
1261; CHECK-LABEL: @ashrsgt_03_08(
1262; CHECK-NEXT:    ret i1 true
1263;
1264  %s = ashr i4 %x, 3
1265  %c = icmp sgt i4 %s, 8
1266  ret i1 %c
1267}
1268
1269define i1 @ashrsgt_03_09(i4 %x) {
1270; CHECK-LABEL: @ashrsgt_03_09(
1271; CHECK-NEXT:    ret i1 true
1272;
1273  %s = ashr i4 %x, 3
1274  %c = icmp sgt i4 %s, 9
1275  ret i1 %c
1276}
1277
1278define i1 @ashrsgt_03_10(i4 %x) {
1279; CHECK-LABEL: @ashrsgt_03_10(
1280; CHECK-NEXT:    ret i1 true
1281;
1282  %s = ashr i4 %x, 3
1283  %c = icmp sgt i4 %s, 10
1284  ret i1 %c
1285}
1286
1287define i1 @ashrsgt_03_11(i4 %x) {
1288; CHECK-LABEL: @ashrsgt_03_11(
1289; CHECK-NEXT:    ret i1 true
1290;
1291  %s = ashr i4 %x, 3
1292  %c = icmp sgt i4 %s, 11
1293  ret i1 %c
1294}
1295
1296define i1 @ashrsgt_03_12(i4 %x) {
1297; CHECK-LABEL: @ashrsgt_03_12(
1298; CHECK-NEXT:    ret i1 true
1299;
1300  %s = ashr i4 %x, 3
1301  %c = icmp sgt i4 %s, 12
1302  ret i1 %c
1303}
1304
1305define i1 @ashrsgt_03_13(i4 %x) {
1306; CHECK-LABEL: @ashrsgt_03_13(
1307; CHECK-NEXT:    ret i1 true
1308;
1309  %s = ashr i4 %x, 3
1310  %c = icmp sgt i4 %s, 13
1311  ret i1 %c
1312}
1313
1314define i1 @ashrsgt_03_14(i4 %x) {
1315; CHECK-LABEL: @ashrsgt_03_14(
1316; CHECK-NEXT:    ret i1 true
1317;
1318  %s = ashr i4 %x, 3
1319  %c = icmp sgt i4 %s, 14
1320  ret i1 %c
1321}
1322
1323define 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]]
1327;
1328  %s = ashr i4 %x, 3
1329  %c = icmp sgt i4 %s, 15
1330  ret i1 %c
1331}
1332
1333define 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]]
1337;
1338  %s = ashr i4 %x, 1
1339  %c = icmp slt i4 %s, 0
1340  ret i1 %c
1341}
1342
1343define 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]]
1347;
1348  %s = ashr i4 %x, 1
1349  %c = icmp slt i4 %s, 1
1350  ret i1 %c
1351}
1352
1353define 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]]
1357;
1358  %s = ashr i4 %x, 1
1359  %c = icmp slt i4 %s, 2
1360  ret i1 %c
1361}
1362
1363define 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]]
1367;
1368  %s = ashr i4 %x, 1
1369  %c = icmp slt i4 %s, 3
1370  ret i1 %c
1371}
1372
1373define i1 @ashrslt_01_04(i4 %x) {
1374; CHECK-LABEL: @ashrslt_01_04(
1375; CHECK-NEXT:    ret i1 true
1376;
1377  %s = ashr i4 %x, 1
1378  %c = icmp slt i4 %s, 4
1379  ret i1 %c
1380}
1381
1382define i1 @ashrslt_01_05(i4 %x) {
1383; CHECK-LABEL: @ashrslt_01_05(
1384; CHECK-NEXT:    ret i1 true
1385;
1386  %s = ashr i4 %x, 1
1387  %c = icmp slt i4 %s, 5
1388  ret i1 %c
1389}
1390
1391define i1 @ashrslt_01_06(i4 %x) {
1392; CHECK-LABEL: @ashrslt_01_06(
1393; CHECK-NEXT:    ret i1 true
1394;
1395  %s = ashr i4 %x, 1
1396  %c = icmp slt i4 %s, 6
1397  ret i1 %c
1398}
1399
1400define i1 @ashrslt_01_07(i4 %x) {
1401; CHECK-LABEL: @ashrslt_01_07(
1402; CHECK-NEXT:    ret i1 true
1403;
1404  %s = ashr i4 %x, 1
1405  %c = icmp slt i4 %s, 7
1406  ret i1 %c
1407}
1408
1409define i1 @ashrslt_01_08(i4 %x) {
1410; CHECK-LABEL: @ashrslt_01_08(
1411; CHECK-NEXT:    ret i1 false
1412;
1413  %s = ashr i4 %x, 1
1414  %c = icmp slt i4 %s, 8
1415  ret i1 %c
1416}
1417
1418define i1 @ashrslt_01_09(i4 %x) {
1419; CHECK-LABEL: @ashrslt_01_09(
1420; CHECK-NEXT:    ret i1 false
1421;
1422  %s = ashr i4 %x, 1
1423  %c = icmp slt i4 %s, 9
1424  ret i1 %c
1425}
1426
1427define i1 @ashrslt_01_10(i4 %x) {
1428; CHECK-LABEL: @ashrslt_01_10(
1429; CHECK-NEXT:    ret i1 false
1430;
1431  %s = ashr i4 %x, 1
1432  %c = icmp slt i4 %s, 10
1433  ret i1 %c
1434}
1435
1436define i1 @ashrslt_01_11(i4 %x) {
1437; CHECK-LABEL: @ashrslt_01_11(
1438; CHECK-NEXT:    ret i1 false
1439;
1440  %s = ashr i4 %x, 1
1441  %c = icmp slt i4 %s, 11
1442  ret i1 %c
1443}
1444
1445define i1 @ashrslt_01_12(i4 %x) {
1446; CHECK-LABEL: @ashrslt_01_12(
1447; CHECK-NEXT:    ret i1 false
1448;
1449  %s = ashr i4 %x, 1
1450  %c = icmp slt i4 %s, 12
1451  ret i1 %c
1452}
1453
1454define 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]]
1458;
1459  %s = ashr i4 %x, 1
1460  %c = icmp slt i4 %s, 13
1461  ret i1 %c
1462}
1463
1464define 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]]
1468;
1469  %s = ashr i4 %x, 1
1470  %c = icmp slt i4 %s, 14
1471  ret i1 %c
1472}
1473
1474define 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]]
1478;
1479  %s = ashr i4 %x, 1
1480  %c = icmp slt i4 %s, 15
1481  ret i1 %c
1482}
1483
1484define 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]]
1488;
1489  %s = ashr i4 %x, 2
1490  %c = icmp slt i4 %s, 0
1491  ret i1 %c
1492}
1493
1494define 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]]
1498;
1499  %s = ashr i4 %x, 2
1500  %c = icmp slt i4 %s, 1
1501  ret i1 %c
1502}
1503
1504define i1 @ashrslt_02_02(i4 %x) {
1505; CHECK-LABEL: @ashrslt_02_02(
1506; CHECK-NEXT:    ret i1 true
1507;
1508  %s = ashr i4 %x, 2
1509  %c = icmp slt i4 %s, 2
1510  ret i1 %c
1511}
1512
1513define i1 @ashrslt_02_03(i4 %x) {
1514; CHECK-LABEL: @ashrslt_02_03(
1515; CHECK-NEXT:    ret i1 true
1516;
1517  %s = ashr i4 %x, 2
1518  %c = icmp slt i4 %s, 3
1519  ret i1 %c
1520}
1521
1522define i1 @ashrslt_02_04(i4 %x) {
1523; CHECK-LABEL: @ashrslt_02_04(
1524; CHECK-NEXT:    ret i1 true
1525;
1526  %s = ashr i4 %x, 2
1527  %c = icmp slt i4 %s, 4
1528  ret i1 %c
1529}
1530
1531define i1 @ashrslt_02_05(i4 %x) {
1532; CHECK-LABEL: @ashrslt_02_05(
1533; CHECK-NEXT:    ret i1 true
1534;
1535  %s = ashr i4 %x, 2
1536  %c = icmp slt i4 %s, 5
1537  ret i1 %c
1538}
1539
1540define i1 @ashrslt_02_06(i4 %x) {
1541; CHECK-LABEL: @ashrslt_02_06(
1542; CHECK-NEXT:    ret i1 true
1543;
1544  %s = ashr i4 %x, 2
1545  %c = icmp slt i4 %s, 6
1546  ret i1 %c
1547}
1548
1549define i1 @ashrslt_02_07(i4 %x) {
1550; CHECK-LABEL: @ashrslt_02_07(
1551; CHECK-NEXT:    ret i1 true
1552;
1553  %s = ashr i4 %x, 2
1554  %c = icmp slt i4 %s, 7
1555  ret i1 %c
1556}
1557
1558define i1 @ashrslt_02_08(i4 %x) {
1559; CHECK-LABEL: @ashrslt_02_08(
1560; CHECK-NEXT:    ret i1 false
1561;
1562  %s = ashr i4 %x, 2
1563  %c = icmp slt i4 %s, 8
1564  ret i1 %c
1565}
1566
1567define i1 @ashrslt_02_09(i4 %x) {
1568; CHECK-LABEL: @ashrslt_02_09(
1569; CHECK-NEXT:    ret i1 false
1570;
1571  %s = ashr i4 %x, 2
1572  %c = icmp slt i4 %s, 9
1573  ret i1 %c
1574}
1575
1576define i1 @ashrslt_02_10(i4 %x) {
1577; CHECK-LABEL: @ashrslt_02_10(
1578; CHECK-NEXT:    ret i1 false
1579;
1580  %s = ashr i4 %x, 2
1581  %c = icmp slt i4 %s, 10
1582  ret i1 %c
1583}
1584
1585define i1 @ashrslt_02_11(i4 %x) {
1586; CHECK-LABEL: @ashrslt_02_11(
1587; CHECK-NEXT:    ret i1 false
1588;
1589  %s = ashr i4 %x, 2
1590  %c = icmp slt i4 %s, 11
1591  ret i1 %c
1592}
1593
1594define i1 @ashrslt_02_12(i4 %x) {
1595; CHECK-LABEL: @ashrslt_02_12(
1596; CHECK-NEXT:    ret i1 false
1597;
1598  %s = ashr i4 %x, 2
1599  %c = icmp slt i4 %s, 12
1600  ret i1 %c
1601}
1602
1603define i1 @ashrslt_02_13(i4 %x) {
1604; CHECK-LABEL: @ashrslt_02_13(
1605; CHECK-NEXT:    ret i1 false
1606;
1607  %s = ashr i4 %x, 2
1608  %c = icmp slt i4 %s, 13
1609  ret i1 %c
1610}
1611
1612define i1 @ashrslt_02_14(i4 %x) {
1613; CHECK-LABEL: @ashrslt_02_14(
1614; CHECK-NEXT:    ret i1 false
1615;
1616  %s = ashr i4 %x, 2
1617  %c = icmp slt i4 %s, 14
1618  ret i1 %c
1619}
1620
1621define 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]]
1625;
1626  %s = ashr i4 %x, 2
1627  %c = icmp slt i4 %s, 15
1628  ret i1 %c
1629}
1630
1631define 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]]
1635;
1636  %s = ashr i4 %x, 3
1637  %c = icmp slt i4 %s, 0
1638  ret i1 %c
1639}
1640
1641define i1 @ashrslt_03_01(i4 %x) {
1642; CHECK-LABEL: @ashrslt_03_01(
1643; CHECK-NEXT:    ret i1 true
1644;
1645  %s = ashr i4 %x, 3
1646  %c = icmp slt i4 %s, 1
1647  ret i1 %c
1648}
1649
1650define i1 @ashrslt_03_02(i4 %x) {
1651; CHECK-LABEL: @ashrslt_03_02(
1652; CHECK-NEXT:    ret i1 true
1653;
1654  %s = ashr i4 %x, 3
1655  %c = icmp slt i4 %s, 2
1656  ret i1 %c
1657}
1658
1659define i1 @ashrslt_03_03(i4 %x) {
1660; CHECK-LABEL: @ashrslt_03_03(
1661; CHECK-NEXT:    ret i1 true
1662;
1663  %s = ashr i4 %x, 3
1664  %c = icmp slt i4 %s, 3
1665  ret i1 %c
1666}
1667
1668define i1 @ashrslt_03_04(i4 %x) {
1669; CHECK-LABEL: @ashrslt_03_04(
1670; CHECK-NEXT:    ret i1 true
1671;
1672  %s = ashr i4 %x, 3
1673  %c = icmp slt i4 %s, 4
1674  ret i1 %c
1675}
1676
1677define i1 @ashrslt_03_05(i4 %x) {
1678; CHECK-LABEL: @ashrslt_03_05(
1679; CHECK-NEXT:    ret i1 true
1680;
1681  %s = ashr i4 %x, 3
1682  %c = icmp slt i4 %s, 5
1683  ret i1 %c
1684}
1685
1686define i1 @ashrslt_03_06(i4 %x) {
1687; CHECK-LABEL: @ashrslt_03_06(
1688; CHECK-NEXT:    ret i1 true
1689;
1690  %s = ashr i4 %x, 3
1691  %c = icmp slt i4 %s, 6
1692  ret i1 %c
1693}
1694
1695define i1 @ashrslt_03_07(i4 %x) {
1696; CHECK-LABEL: @ashrslt_03_07(
1697; CHECK-NEXT:    ret i1 true
1698;
1699  %s = ashr i4 %x, 3
1700  %c = icmp slt i4 %s, 7
1701  ret i1 %c
1702}
1703
1704define i1 @ashrslt_03_08(i4 %x) {
1705; CHECK-LABEL: @ashrslt_03_08(
1706; CHECK-NEXT:    ret i1 false
1707;
1708  %s = ashr i4 %x, 3
1709  %c = icmp slt i4 %s, 8
1710  ret i1 %c
1711}
1712
1713define i1 @ashrslt_03_09(i4 %x) {
1714; CHECK-LABEL: @ashrslt_03_09(
1715; CHECK-NEXT:    ret i1 false
1716;
1717  %s = ashr i4 %x, 3
1718  %c = icmp slt i4 %s, 9
1719  ret i1 %c
1720}
1721
1722define i1 @ashrslt_03_10(i4 %x) {
1723; CHECK-LABEL: @ashrslt_03_10(
1724; CHECK-NEXT:    ret i1 false
1725;
1726  %s = ashr i4 %x, 3
1727  %c = icmp slt i4 %s, 10
1728  ret i1 %c
1729}
1730
1731define i1 @ashrslt_03_11(i4 %x) {
1732; CHECK-LABEL: @ashrslt_03_11(
1733; CHECK-NEXT:    ret i1 false
1734;
1735  %s = ashr i4 %x, 3
1736  %c = icmp slt i4 %s, 11
1737  ret i1 %c
1738}
1739
1740define i1 @ashrslt_03_12(i4 %x) {
1741; CHECK-LABEL: @ashrslt_03_12(
1742; CHECK-NEXT:    ret i1 false
1743;
1744  %s = ashr i4 %x, 3
1745  %c = icmp slt i4 %s, 12
1746  ret i1 %c
1747}
1748
1749define i1 @ashrslt_03_13(i4 %x) {
1750; CHECK-LABEL: @ashrslt_03_13(
1751; CHECK-NEXT:    ret i1 false
1752;
1753  %s = ashr i4 %x, 3
1754  %c = icmp slt i4 %s, 13
1755  ret i1 %c
1756}
1757
1758define i1 @ashrslt_03_14(i4 %x) {
1759; CHECK-LABEL: @ashrslt_03_14(
1760; CHECK-NEXT:    ret i1 false
1761;
1762  %s = ashr i4 %x, 3
1763  %c = icmp slt i4 %s, 14
1764  ret i1 %c
1765}
1766
1767define i1 @ashrslt_03_15(i4 %x) {
1768; CHECK-LABEL: @ashrslt_03_15(
1769; CHECK-NEXT:    ret i1 false
1770;
1771  %s = ashr i4 %x, 3
1772  %c = icmp slt i4 %s, 15
1773  ret i1 %c
1774}
1775
1776define 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]]
1780;
1781  %s = lshr exact i4 %x, 1
1782  %c = icmp ugt i4 %s, 0
1783  ret i1 %c
1784}
1785
1786define 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]]
1790;
1791  %s = lshr exact i4 %x, 1
1792  %c = icmp ugt i4 %s, 1
1793  ret i1 %c
1794}
1795
1796define 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]]
1800;
1801  %s = lshr exact i4 %x, 1
1802  %c = icmp ugt i4 %s, 2
1803  ret i1 %c
1804}
1805
1806define 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]]
1810;
1811  %s = lshr exact i4 %x, 1
1812  %c = icmp ugt i4 %s, 3
1813  ret i1 %c
1814}
1815
1816define 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]]
1820;
1821  %s = lshr exact i4 %x, 1
1822  %c = icmp ugt i4 %s, 4
1823  ret i1 %c
1824}
1825
1826define 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]]
1830;
1831  %s = lshr exact i4 %x, 1
1832  %c = icmp ugt i4 %s, 5
1833  ret i1 %c
1834}
1835
1836define 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]]
1840;
1841  %s = lshr exact i4 %x, 1
1842  %c = icmp ugt i4 %s, 6
1843  ret i1 %c
1844}
1845
1846define i1 @lshrugt_01_07_exact(i4 %x) {
1847; CHECK-LABEL: @lshrugt_01_07_exact(
1848; CHECK-NEXT:    ret i1 false
1849;
1850  %s = lshr exact i4 %x, 1
1851  %c = icmp ugt i4 %s, 7
1852  ret i1 %c
1853}
1854
1855define i1 @lshrugt_01_08_exact(i4 %x) {
1856; CHECK-LABEL: @lshrugt_01_08_exact(
1857; CHECK-NEXT:    ret i1 false
1858;
1859  %s = lshr exact i4 %x, 1
1860  %c = icmp ugt i4 %s, 8
1861  ret i1 %c
1862}
1863
1864define i1 @lshrugt_01_09_exact(i4 %x) {
1865; CHECK-LABEL: @lshrugt_01_09_exact(
1866; CHECK-NEXT:    ret i1 false
1867;
1868  %s = lshr exact i4 %x, 1
1869  %c = icmp ugt i4 %s, 9
1870  ret i1 %c
1871}
1872
1873define i1 @lshrugt_01_10_exact(i4 %x) {
1874; CHECK-LABEL: @lshrugt_01_10_exact(
1875; CHECK-NEXT:    ret i1 false
1876;
1877  %s = lshr exact i4 %x, 1
1878  %c = icmp ugt i4 %s, 10
1879  ret i1 %c
1880}
1881
1882define i1 @lshrugt_01_11_exact(i4 %x) {
1883; CHECK-LABEL: @lshrugt_01_11_exact(
1884; CHECK-NEXT:    ret i1 false
1885;
1886  %s = lshr exact i4 %x, 1
1887  %c = icmp ugt i4 %s, 11
1888  ret i1 %c
1889}
1890
1891define i1 @lshrugt_01_12_exact(i4 %x) {
1892; CHECK-LABEL: @lshrugt_01_12_exact(
1893; CHECK-NEXT:    ret i1 false
1894;
1895  %s = lshr exact i4 %x, 1
1896  %c = icmp ugt i4 %s, 12
1897  ret i1 %c
1898}
1899
1900define i1 @lshrugt_01_13_exact(i4 %x) {
1901; CHECK-LABEL: @lshrugt_01_13_exact(
1902; CHECK-NEXT:    ret i1 false
1903;
1904  %s = lshr exact i4 %x, 1
1905  %c = icmp ugt i4 %s, 13
1906  ret i1 %c
1907}
1908
1909define i1 @lshrugt_01_14_exact(i4 %x) {
1910; CHECK-LABEL: @lshrugt_01_14_exact(
1911; CHECK-NEXT:    ret i1 false
1912;
1913  %s = lshr exact i4 %x, 1
1914  %c = icmp ugt i4 %s, 14
1915  ret i1 %c
1916}
1917
1918define i1 @lshrugt_01_15_exact(i4 %x) {
1919; CHECK-LABEL: @lshrugt_01_15_exact(
1920; CHECK-NEXT:    ret i1 false
1921;
1922  %s = lshr exact i4 %x, 1
1923  %c = icmp ugt i4 %s, 15
1924  ret i1 %c
1925}
1926
1927define 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]]
1931;
1932  %s = lshr exact i4 %x, 2
1933  %c = icmp ugt i4 %s, 0
1934  ret i1 %c
1935}
1936
1937define 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]]
1941;
1942  %s = lshr exact i4 %x, 2
1943  %c = icmp ugt i4 %s, 1
1944  ret i1 %c
1945}
1946
1947define 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]]
1951;
1952  %s = lshr exact i4 %x, 2
1953  %c = icmp ugt i4 %s, 2
1954  ret i1 %c
1955}
1956
1957define i1 @lshrugt_02_03_exact(i4 %x) {
1958; CHECK-LABEL: @lshrugt_02_03_exact(
1959; CHECK-NEXT:    ret i1 false
1960;
1961  %s = lshr exact i4 %x, 2
1962  %c = icmp ugt i4 %s, 3
1963  ret i1 %c
1964}
1965
1966define i1 @lshrugt_02_04_exact(i4 %x) {
1967; CHECK-LABEL: @lshrugt_02_04_exact(
1968; CHECK-NEXT:    ret i1 false
1969;
1970  %s = lshr exact i4 %x, 2
1971  %c = icmp ugt i4 %s, 4
1972  ret i1 %c
1973}
1974
1975define i1 @lshrugt_02_05_exact(i4 %x) {
1976; CHECK-LABEL: @lshrugt_02_05_exact(
1977; CHECK-NEXT:    ret i1 false
1978;
1979  %s = lshr exact i4 %x, 2
1980  %c = icmp ugt i4 %s, 5
1981  ret i1 %c
1982}
1983
1984define i1 @lshrugt_02_06_exact(i4 %x) {
1985; CHECK-LABEL: @lshrugt_02_06_exact(
1986; CHECK-NEXT:    ret i1 false
1987;
1988  %s = lshr exact i4 %x, 2
1989  %c = icmp ugt i4 %s, 6
1990  ret i1 %c
1991}
1992
1993define i1 @lshrugt_02_07_exact(i4 %x) {
1994; CHECK-LABEL: @lshrugt_02_07_exact(
1995; CHECK-NEXT:    ret i1 false
1996;
1997  %s = lshr exact i4 %x, 2
1998  %c = icmp ugt i4 %s, 7
1999  ret i1 %c
2000}
2001
2002define i1 @lshrugt_02_08_exact(i4 %x) {
2003; CHECK-LABEL: @lshrugt_02_08_exact(
2004; CHECK-NEXT:    ret i1 false
2005;
2006  %s = lshr exact i4 %x, 2
2007  %c = icmp ugt i4 %s, 8
2008  ret i1 %c
2009}
2010
2011define i1 @lshrugt_02_09_exact(i4 %x) {
2012; CHECK-LABEL: @lshrugt_02_09_exact(
2013; CHECK-NEXT:    ret i1 false
2014;
2015  %s = lshr exact i4 %x, 2
2016  %c = icmp ugt i4 %s, 9
2017  ret i1 %c
2018}
2019
2020define i1 @lshrugt_02_10_exact(i4 %x) {
2021; CHECK-LABEL: @lshrugt_02_10_exact(
2022; CHECK-NEXT:    ret i1 false
2023;
2024  %s = lshr exact i4 %x, 2
2025  %c = icmp ugt i4 %s, 10
2026  ret i1 %c
2027}
2028
2029define i1 @lshrugt_02_11_exact(i4 %x) {
2030; CHECK-LABEL: @lshrugt_02_11_exact(
2031; CHECK-NEXT:    ret i1 false
2032;
2033  %s = lshr exact i4 %x, 2
2034  %c = icmp ugt i4 %s, 11
2035  ret i1 %c
2036}
2037
2038define i1 @lshrugt_02_12_exact(i4 %x) {
2039; CHECK-LABEL: @lshrugt_02_12_exact(
2040; CHECK-NEXT:    ret i1 false
2041;
2042  %s = lshr exact i4 %x, 2
2043  %c = icmp ugt i4 %s, 12
2044  ret i1 %c
2045}
2046
2047define i1 @lshrugt_02_13_exact(i4 %x) {
2048; CHECK-LABEL: @lshrugt_02_13_exact(
2049; CHECK-NEXT:    ret i1 false
2050;
2051  %s = lshr exact i4 %x, 2
2052  %c = icmp ugt i4 %s, 13
2053  ret i1 %c
2054}
2055
2056define i1 @lshrugt_02_14_exact(i4 %x) {
2057; CHECK-LABEL: @lshrugt_02_14_exact(
2058; CHECK-NEXT:    ret i1 false
2059;
2060  %s = lshr exact i4 %x, 2
2061  %c = icmp ugt i4 %s, 14
2062  ret i1 %c
2063}
2064
2065define i1 @lshrugt_02_15_exact(i4 %x) {
2066; CHECK-LABEL: @lshrugt_02_15_exact(
2067; CHECK-NEXT:    ret i1 false
2068;
2069  %s = lshr exact i4 %x, 2
2070  %c = icmp ugt i4 %s, 15
2071  ret i1 %c
2072}
2073
2074define 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]]
2078;
2079  %s = lshr exact i4 %x, 3
2080  %c = icmp ugt i4 %s, 0
2081  ret i1 %c
2082}
2083
2084define i1 @lshrugt_03_01_exact(i4 %x) {
2085; CHECK-LABEL: @lshrugt_03_01_exact(
2086; CHECK-NEXT:    ret i1 false
2087;
2088  %s = lshr exact i4 %x, 3
2089  %c = icmp ugt i4 %s, 1
2090  ret i1 %c
2091}
2092
2093define i1 @lshrugt_03_02_exact(i4 %x) {
2094; CHECK-LABEL: @lshrugt_03_02_exact(
2095; CHECK-NEXT:    ret i1 false
2096;
2097  %s = lshr exact i4 %x, 3
2098  %c = icmp ugt i4 %s, 2
2099  ret i1 %c
2100}
2101
2102define i1 @lshrugt_03_03_exact(i4 %x) {
2103; CHECK-LABEL: @lshrugt_03_03_exact(
2104; CHECK-NEXT:    ret i1 false
2105;
2106  %s = lshr exact i4 %x, 3
2107  %c = icmp ugt i4 %s, 3
2108  ret i1 %c
2109}
2110
2111define i1 @lshrugt_03_04_exact(i4 %x) {
2112; CHECK-LABEL: @lshrugt_03_04_exact(
2113; CHECK-NEXT:    ret i1 false
2114;
2115  %s = lshr exact i4 %x, 3
2116  %c = icmp ugt i4 %s, 4
2117  ret i1 %c
2118}
2119
2120define i1 @lshrugt_03_05_exact(i4 %x) {
2121; CHECK-LABEL: @lshrugt_03_05_exact(
2122; CHECK-NEXT:    ret i1 false
2123;
2124  %s = lshr exact i4 %x, 3
2125  %c = icmp ugt i4 %s, 5
2126  ret i1 %c
2127}
2128
2129define i1 @lshrugt_03_06_exact(i4 %x) {
2130; CHECK-LABEL: @lshrugt_03_06_exact(
2131; CHECK-NEXT:    ret i1 false
2132;
2133  %s = lshr exact i4 %x, 3
2134  %c = icmp ugt i4 %s, 6
2135  ret i1 %c
2136}
2137
2138define i1 @lshrugt_03_07_exact(i4 %x) {
2139; CHECK-LABEL: @lshrugt_03_07_exact(
2140; CHECK-NEXT:    ret i1 false
2141;
2142  %s = lshr exact i4 %x, 3
2143  %c = icmp ugt i4 %s, 7
2144  ret i1 %c
2145}
2146
2147define i1 @lshrugt_03_08_exact(i4 %x) {
2148; CHECK-LABEL: @lshrugt_03_08_exact(
2149; CHECK-NEXT:    ret i1 false
2150;
2151  %s = lshr exact i4 %x, 3
2152  %c = icmp ugt i4 %s, 8
2153  ret i1 %c
2154}
2155
2156define i1 @lshrugt_03_09_exact(i4 %x) {
2157; CHECK-LABEL: @lshrugt_03_09_exact(
2158; CHECK-NEXT:    ret i1 false
2159;
2160  %s = lshr exact i4 %x, 3
2161  %c = icmp ugt i4 %s, 9
2162  ret i1 %c
2163}
2164
2165define i1 @lshrugt_03_10_exact(i4 %x) {
2166; CHECK-LABEL: @lshrugt_03_10_exact(
2167; CHECK-NEXT:    ret i1 false
2168;
2169  %s = lshr exact i4 %x, 3
2170  %c = icmp ugt i4 %s, 10
2171  ret i1 %c
2172}
2173
2174define i1 @lshrugt_03_11_exact(i4 %x) {
2175; CHECK-LABEL: @lshrugt_03_11_exact(
2176; CHECK-NEXT:    ret i1 false
2177;
2178  %s = lshr exact i4 %x, 3
2179  %c = icmp ugt i4 %s, 11
2180  ret i1 %c
2181}
2182
2183define i1 @lshrugt_03_12_exact(i4 %x) {
2184; CHECK-LABEL: @lshrugt_03_12_exact(
2185; CHECK-NEXT:    ret i1 false
2186;
2187  %s = lshr exact i4 %x, 3
2188  %c = icmp ugt i4 %s, 12
2189  ret i1 %c
2190}
2191
2192define i1 @lshrugt_03_13_exact(i4 %x) {
2193; CHECK-LABEL: @lshrugt_03_13_exact(
2194; CHECK-NEXT:    ret i1 false
2195;
2196  %s = lshr exact i4 %x, 3
2197  %c = icmp ugt i4 %s, 13
2198  ret i1 %c
2199}
2200
2201define i1 @lshrugt_03_14_exact(i4 %x) {
2202; CHECK-LABEL: @lshrugt_03_14_exact(
2203; CHECK-NEXT:    ret i1 false
2204;
2205  %s = lshr exact i4 %x, 3
2206  %c = icmp ugt i4 %s, 14
2207  ret i1 %c
2208}
2209
2210define i1 @lshrugt_03_15_exact(i4 %x) {
2211; CHECK-LABEL: @lshrugt_03_15_exact(
2212; CHECK-NEXT:    ret i1 false
2213;
2214  %s = lshr exact i4 %x, 3
2215  %c = icmp ugt i4 %s, 15
2216  ret i1 %c
2217}
2218
2219define i1 @lshrult_01_00_exact(i4 %x) {
2220; CHECK-LABEL: @lshrult_01_00_exact(
2221; CHECK-NEXT:    ret i1 false
2222;
2223  %s = lshr exact i4 %x, 1
2224  %c = icmp ult i4 %s, 0
2225  ret i1 %c
2226}
2227
2228define i1 @lshrult_01_01_exact(i4 %x) {
2229; CHECK-LABEL: @lshrult_01_01_exact(
2230; CHECK-NEXT:    [[C:%.*]] = icmp eq i4 [[X:%.*]], 0
2231; CHECK-NEXT:    ret i1 [[C]]
2232;
2233  %s = lshr exact i4 %x, 1
2234  %c = icmp ult i4 %s, 1
2235  ret i1 %c
2236}
2237
2238define i1 @lshrult_01_02_exact(i4 %x) {
2239; CHECK-LABEL: @lshrult_01_02_exact(
2240; CHECK-NEXT:    [[C:%.*]] = icmp ult i4 [[X:%.*]], 4
2241; CHECK-NEXT:    ret i1 [[C]]
2242;
2243  %s = lshr exact i4 %x, 1
2244  %c = icmp ult i4 %s, 2
2245  ret i1 %c
2246}
2247
2248define i1 @lshrult_01_03_exact(i4 %x) {
2249; CHECK-LABEL: @lshrult_01_03_exact(
2250; CHECK-NEXT:    [[C:%.*]] = icmp ult i4 [[X:%.*]], 6
2251; CHECK-NEXT:    ret i1 [[C]]
2252;
2253  %s = lshr exact i4 %x, 1
2254  %c = icmp ult i4 %s, 3
2255  ret i1 %c
2256}
2257
2258define i1 @lshrult_01_04_exact(i4 %x) {
2259; CHECK-LABEL: @lshrult_01_04_exact(
2260; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
2261; CHECK-NEXT:    ret i1 [[C]]
2262;
2263  %s = lshr exact i4 %x, 1
2264  %c = icmp ult i4 %s, 4
2265  ret i1 %c
2266}
2267
2268define i1 @lshrult_01_05_exact(i4 %x) {
2269; CHECK-LABEL: @lshrult_01_05_exact(
2270; CHECK-NEXT:    [[C:%.*]] = icmp ult i4 [[X:%.*]], -6
2271; CHECK-NEXT:    ret i1 [[C]]
2272;
2273  %s = lshr exact i4 %x, 1
2274  %c = icmp ult i4 %s, 5
2275  ret i1 %c
2276}
2277
2278define i1 @lshrult_01_06_exact(i4 %x) {
2279; CHECK-LABEL: @lshrult_01_06_exact(
2280; CHECK-NEXT:    [[C:%.*]] = icmp ult i4 [[X:%.*]], -4
2281; CHECK-NEXT:    ret i1 [[C]]
2282;
2283  %s = lshr exact i4 %x, 1
2284  %c = icmp ult i4 %s, 6
2285  ret i1 %c
2286}
2287
2288define i1 @lshrult_01_07_exact(i4 %x) {
2289; CHECK-LABEL: @lshrult_01_07_exact(
2290; CHECK-NEXT:    [[C:%.*]] = icmp ne i4 [[X:%.*]], -2
2291; CHECK-NEXT:    ret i1 [[C]]
2292;
2293  %s = lshr exact i4 %x, 1
2294  %c = icmp ult i4 %s, 7
2295  ret i1 %c
2296}
2297
2298define i1 @lshrult_01_08_exact(i4 %x) {
2299; CHECK-LABEL: @lshrult_01_08_exact(
2300; CHECK-NEXT:    ret i1 true
2301;
2302  %s = lshr exact i4 %x, 1
2303  %c = icmp ult i4 %s, 8
2304  ret i1 %c
2305}
2306
2307define i1 @lshrult_01_09_exact(i4 %x) {
2308; CHECK-LABEL: @lshrult_01_09_exact(
2309; CHECK-NEXT:    ret i1 true
2310;
2311  %s = lshr exact i4 %x, 1
2312  %c = icmp ult i4 %s, 9
2313  ret i1 %c
2314}
2315
2316define i1 @lshrult_01_10_exact(i4 %x) {
2317; CHECK-LABEL: @lshrult_01_10_exact(
2318; CHECK-NEXT:    ret i1 true
2319;
2320  %s = lshr exact i4 %x, 1
2321  %c = icmp ult i4 %s, 10
2322  ret i1 %c
2323}
2324
2325define i1 @lshrult_01_11_exact(i4 %x) {
2326; CHECK-LABEL: @lshrult_01_11_exact(
2327; CHECK-NEXT:    ret i1 true
2328;
2329  %s = lshr exact i4 %x, 1
2330  %c = icmp ult i4 %s, 11
2331  ret i1 %c
2332}
2333
2334define i1 @lshrult_01_12_exact(i4 %x) {
2335; CHECK-LABEL: @lshrult_01_12_exact(
2336; CHECK-NEXT:    ret i1 true
2337;
2338  %s = lshr exact i4 %x, 1
2339  %c = icmp ult i4 %s, 12
2340  ret i1 %c
2341}
2342
2343define i1 @lshrult_01_13_exact(i4 %x) {
2344; CHECK-LABEL: @lshrult_01_13_exact(
2345; CHECK-NEXT:    ret i1 true
2346;
2347  %s = lshr exact i4 %x, 1
2348  %c = icmp ult i4 %s, 13
2349  ret i1 %c
2350}
2351
2352define i1 @lshrult_01_14_exact(i4 %x) {
2353; CHECK-LABEL: @lshrult_01_14_exact(
2354; CHECK-NEXT:    ret i1 true
2355;
2356  %s = lshr exact i4 %x, 1
2357  %c = icmp ult i4 %s, 14
2358  ret i1 %c
2359}
2360
2361define i1 @lshrult_01_15_exact(i4 %x) {
2362; CHECK-LABEL: @lshrult_01_15_exact(
2363; CHECK-NEXT:    ret i1 true
2364;
2365  %s = lshr exact i4 %x, 1
2366  %c = icmp ult i4 %s, 15
2367  ret i1 %c
2368}
2369
2370define i1 @lshrult_02_00_exact(i4 %x) {
2371; CHECK-LABEL: @lshrult_02_00_exact(
2372; CHECK-NEXT:    ret i1 false
2373;
2374  %s = lshr exact i4 %x, 2
2375  %c = icmp ult i4 %s, 0
2376  ret i1 %c
2377}
2378
2379define i1 @lshrult_02_01_exact(i4 %x) {
2380; CHECK-LABEL: @lshrult_02_01_exact(
2381; CHECK-NEXT:    [[C:%.*]] = icmp eq i4 [[X:%.*]], 0
2382; CHECK-NEXT:    ret i1 [[C]]
2383;
2384  %s = lshr exact i4 %x, 2
2385  %c = icmp ult i4 %s, 1
2386  ret i1 %c
2387}
2388
2389define i1 @lshrult_02_02_exact(i4 %x) {
2390; CHECK-LABEL: @lshrult_02_02_exact(
2391; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
2392; CHECK-NEXT:    ret i1 [[C]]
2393;
2394  %s = lshr exact i4 %x, 2
2395  %c = icmp ult i4 %s, 2
2396  ret i1 %c
2397}
2398
2399define i1 @lshrult_02_03_exact(i4 %x) {
2400; CHECK-LABEL: @lshrult_02_03_exact(
2401; CHECK-NEXT:    [[C:%.*]] = icmp ne i4 [[X:%.*]], -4
2402; CHECK-NEXT:    ret i1 [[C]]
2403;
2404  %s = lshr exact i4 %x, 2
2405  %c = icmp ult i4 %s, 3
2406  ret i1 %c
2407}
2408
2409define i1 @lshrult_02_04_exact(i4 %x) {
2410; CHECK-LABEL: @lshrult_02_04_exact(
2411; CHECK-NEXT:    ret i1 true
2412;
2413  %s = lshr exact i4 %x, 2
2414  %c = icmp ult i4 %s, 4
2415  ret i1 %c
2416}
2417
2418define i1 @lshrult_02_05_exact(i4 %x) {
2419; CHECK-LABEL: @lshrult_02_05_exact(
2420; CHECK-NEXT:    ret i1 true
2421;
2422  %s = lshr exact i4 %x, 2
2423  %c = icmp ult i4 %s, 5
2424  ret i1 %c
2425}
2426
2427define i1 @lshrult_02_06_exact(i4 %x) {
2428; CHECK-LABEL: @lshrult_02_06_exact(
2429; CHECK-NEXT:    ret i1 true
2430;
2431  %s = lshr exact i4 %x, 2
2432  %c = icmp ult i4 %s, 6
2433  ret i1 %c
2434}
2435
2436define i1 @lshrult_02_07_exact(i4 %x) {
2437; CHECK-LABEL: @lshrult_02_07_exact(
2438; CHECK-NEXT:    ret i1 true
2439;
2440  %s = lshr exact i4 %x, 2
2441  %c = icmp ult i4 %s, 7
2442  ret i1 %c
2443}
2444
2445define i1 @lshrult_02_08_exact(i4 %x) {
2446; CHECK-LABEL: @lshrult_02_08_exact(
2447; CHECK-NEXT:    ret i1 true
2448;
2449  %s = lshr exact i4 %x, 2
2450  %c = icmp ult i4 %s, 8
2451  ret i1 %c
2452}
2453
2454define i1 @lshrult_02_09_exact(i4 %x) {
2455; CHECK-LABEL: @lshrult_02_09_exact(
2456; CHECK-NEXT:    ret i1 true
2457;
2458  %s = lshr exact i4 %x, 2
2459  %c = icmp ult i4 %s, 9
2460  ret i1 %c
2461}
2462
2463define i1 @lshrult_02_10_exact(i4 %x) {
2464; CHECK-LABEL: @lshrult_02_10_exact(
2465; CHECK-NEXT:    ret i1 true
2466;
2467  %s = lshr exact i4 %x, 2
2468  %c = icmp ult i4 %s, 10
2469  ret i1 %c
2470}
2471
2472define i1 @lshrult_02_11_exact(i4 %x) {
2473; CHECK-LABEL: @lshrult_02_11_exact(
2474; CHECK-NEXT:    ret i1 true
2475;
2476  %s = lshr exact i4 %x, 2
2477  %c = icmp ult i4 %s, 11
2478  ret i1 %c
2479}
2480
2481define i1 @lshrult_02_12_exact(i4 %x) {
2482; CHECK-LABEL: @lshrult_02_12_exact(
2483; CHECK-NEXT:    ret i1 true
2484;
2485  %s = lshr exact i4 %x, 2
2486  %c = icmp ult i4 %s, 12
2487  ret i1 %c
2488}
2489
2490define i1 @lshrult_02_13_exact(i4 %x) {
2491; CHECK-LABEL: @lshrult_02_13_exact(
2492; CHECK-NEXT:    ret i1 true
2493;
2494  %s = lshr exact i4 %x, 2
2495  %c = icmp ult i4 %s, 13
2496  ret i1 %c
2497}
2498
2499define i1 @lshrult_02_14_exact(i4 %x) {
2500; CHECK-LABEL: @lshrult_02_14_exact(
2501; CHECK-NEXT:    ret i1 true
2502;
2503  %s = lshr exact i4 %x, 2
2504  %c = icmp ult i4 %s, 14
2505  ret i1 %c
2506}
2507
2508define i1 @lshrult_02_15_exact(i4 %x) {
2509; CHECK-LABEL: @lshrult_02_15_exact(
2510; CHECK-NEXT:    ret i1 true
2511;
2512  %s = lshr exact i4 %x, 2
2513  %c = icmp ult i4 %s, 15
2514  ret i1 %c
2515}
2516
2517define i1 @lshrult_03_00_exact(i4 %x) {
2518; CHECK-LABEL: @lshrult_03_00_exact(
2519; CHECK-NEXT:    ret i1 false
2520;
2521  %s = lshr exact i4 %x, 3
2522  %c = icmp ult i4 %s, 0
2523  ret i1 %c
2524}
2525
2526define i1 @lshrult_03_01_exact(i4 %x) {
2527; CHECK-LABEL: @lshrult_03_01_exact(
2528; CHECK-NEXT:    [[C:%.*]] = icmp ne i4 [[X:%.*]], -8
2529; CHECK-NEXT:    ret i1 [[C]]
2530;
2531  %s = lshr exact i4 %x, 3
2532  %c = icmp ult i4 %s, 1
2533  ret i1 %c
2534}
2535
2536define i1 @lshrult_03_02_exact(i4 %x) {
2537; CHECK-LABEL: @lshrult_03_02_exact(
2538; CHECK-NEXT:    ret i1 true
2539;
2540  %s = lshr exact i4 %x, 3
2541  %c = icmp ult i4 %s, 2
2542  ret i1 %c
2543}
2544
2545define i1 @lshrult_03_03_exact(i4 %x) {
2546; CHECK-LABEL: @lshrult_03_03_exact(
2547; CHECK-NEXT:    ret i1 true
2548;
2549  %s = lshr exact i4 %x, 3
2550  %c = icmp ult i4 %s, 3
2551  ret i1 %c
2552}
2553
2554define i1 @lshrult_03_04_exact(i4 %x) {
2555; CHECK-LABEL: @lshrult_03_04_exact(
2556; CHECK-NEXT:    ret i1 true
2557;
2558  %s = lshr exact i4 %x, 3
2559  %c = icmp ult i4 %s, 4
2560  ret i1 %c
2561}
2562
2563define i1 @lshrult_03_05_exact(i4 %x) {
2564; CHECK-LABEL: @lshrult_03_05_exact(
2565; CHECK-NEXT:    ret i1 true
2566;
2567  %s = lshr exact i4 %x, 3
2568  %c = icmp ult i4 %s, 5
2569  ret i1 %c
2570}
2571
2572define i1 @lshrult_03_06_exact(i4 %x) {
2573; CHECK-LABEL: @lshrult_03_06_exact(
2574; CHECK-NEXT:    ret i1 true
2575;
2576  %s = lshr exact i4 %x, 3
2577  %c = icmp ult i4 %s, 6
2578  ret i1 %c
2579}
2580
2581define i1 @lshrult_03_07_exact(i4 %x) {
2582; CHECK-LABEL: @lshrult_03_07_exact(
2583; CHECK-NEXT:    ret i1 true
2584;
2585  %s = lshr exact i4 %x, 3
2586  %c = icmp ult i4 %s, 7
2587  ret i1 %c
2588}
2589
2590define i1 @lshrult_03_08_exact(i4 %x) {
2591; CHECK-LABEL: @lshrult_03_08_exact(
2592; CHECK-NEXT:    ret i1 true
2593;
2594  %s = lshr exact i4 %x, 3
2595  %c = icmp ult i4 %s, 8
2596  ret i1 %c
2597}
2598
2599define i1 @lshrult_03_09_exact(i4 %x) {
2600; CHECK-LABEL: @lshrult_03_09_exact(
2601; CHECK-NEXT:    ret i1 true
2602;
2603  %s = lshr exact i4 %x, 3
2604  %c = icmp ult i4 %s, 9
2605  ret i1 %c
2606}
2607
2608define i1 @lshrult_03_10_exact(i4 %x) {
2609; CHECK-LABEL: @lshrult_03_10_exact(
2610; CHECK-NEXT:    ret i1 true
2611;
2612  %s = lshr exact i4 %x, 3
2613  %c = icmp ult i4 %s, 10
2614  ret i1 %c
2615}
2616
2617define i1 @lshrult_03_11_exact(i4 %x) {
2618; CHECK-LABEL: @lshrult_03_11_exact(
2619; CHECK-NEXT:    ret i1 true
2620;
2621  %s = lshr exact i4 %x, 3
2622  %c = icmp ult i4 %s, 11
2623  ret i1 %c
2624}
2625
2626define i1 @lshrult_03_12_exact(i4 %x) {
2627; CHECK-LABEL: @lshrult_03_12_exact(
2628; CHECK-NEXT:    ret i1 true
2629;
2630  %s = lshr exact i4 %x, 3
2631  %c = icmp ult i4 %s, 12
2632  ret i1 %c
2633}
2634
2635define i1 @lshrult_03_13_exact(i4 %x) {
2636; CHECK-LABEL: @lshrult_03_13_exact(
2637; CHECK-NEXT:    ret i1 true
2638;
2639  %s = lshr exact i4 %x, 3
2640  %c = icmp ult i4 %s, 13
2641  ret i1 %c
2642}
2643
2644define i1 @lshrult_03_14_exact(i4 %x) {
2645; CHECK-LABEL: @lshrult_03_14_exact(
2646; CHECK-NEXT:    ret i1 true
2647;
2648  %s = lshr exact i4 %x, 3
2649  %c = icmp ult i4 %s, 14
2650  ret i1 %c
2651}
2652
2653define i1 @lshrult_03_15_exact(i4 %x) {
2654; CHECK-LABEL: @lshrult_03_15_exact(
2655; CHECK-NEXT:    ret i1 true
2656;
2657  %s = lshr exact i4 %x, 3
2658  %c = icmp ult i4 %s, 15
2659  ret i1 %c
2660}
2661
2662define i1 @ashrsgt_01_00_exact(i4 %x) {
2663; CHECK-LABEL: @ashrsgt_01_00_exact(
2664; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], 0
2665; CHECK-NEXT:    ret i1 [[C]]
2666;
2667  %s = ashr exact i4 %x, 1
2668  %c = icmp sgt i4 %s, 0
2669  ret i1 %c
2670}
2671
2672define i1 @ashrsgt_01_01_exact(i4 %x) {
2673; CHECK-LABEL: @ashrsgt_01_01_exact(
2674; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], 2
2675; CHECK-NEXT:    ret i1 [[C]]
2676;
2677  %s = ashr exact i4 %x, 1
2678  %c = icmp sgt i4 %s, 1
2679  ret i1 %c
2680}
2681
2682define i1 @ashrsgt_01_02_exact(i4 %x) {
2683; CHECK-LABEL: @ashrsgt_01_02_exact(
2684; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], 4
2685; CHECK-NEXT:    ret i1 [[C]]
2686;
2687  %s = ashr exact i4 %x, 1
2688  %c = icmp sgt i4 %s, 2
2689  ret i1 %c
2690}
2691
2692define i1 @ashrsgt_01_03_exact(i4 %x) {
2693; CHECK-LABEL: @ashrsgt_01_03_exact(
2694; CHECK-NEXT:    ret i1 false
2695;
2696  %s = ashr exact i4 %x, 1
2697  %c = icmp sgt i4 %s, 3
2698  ret i1 %c
2699}
2700
2701define i1 @ashrsgt_01_04_exact(i4 %x) {
2702; CHECK-LABEL: @ashrsgt_01_04_exact(
2703; CHECK-NEXT:    ret i1 false
2704;
2705  %s = ashr exact i4 %x, 1
2706  %c = icmp sgt i4 %s, 4
2707  ret i1 %c
2708}
2709
2710define i1 @ashrsgt_01_05_exact(i4 %x) {
2711; CHECK-LABEL: @ashrsgt_01_05_exact(
2712; CHECK-NEXT:    ret i1 false
2713;
2714  %s = ashr exact i4 %x, 1
2715  %c = icmp sgt i4 %s, 5
2716  ret i1 %c
2717}
2718
2719define i1 @ashrsgt_01_06_exact(i4 %x) {
2720; CHECK-LABEL: @ashrsgt_01_06_exact(
2721; CHECK-NEXT:    ret i1 false
2722;
2723  %s = ashr exact i4 %x, 1
2724  %c = icmp sgt i4 %s, 6
2725  ret i1 %c
2726}
2727
2728define i1 @ashrsgt_01_07_exact(i4 %x) {
2729; CHECK-LABEL: @ashrsgt_01_07_exact(
2730; CHECK-NEXT:    ret i1 false
2731;
2732  %s = ashr exact i4 %x, 1
2733  %c = icmp sgt i4 %s, 7
2734  ret i1 %c
2735}
2736
2737define i1 @ashrsgt_01_08_exact(i4 %x) {
2738; CHECK-LABEL: @ashrsgt_01_08_exact(
2739; CHECK-NEXT:    ret i1 true
2740;
2741  %s = ashr exact i4 %x, 1
2742  %c = icmp sgt i4 %s, 8
2743  ret i1 %c
2744}
2745
2746define i1 @ashrsgt_01_09_exact(i4 %x) {
2747; CHECK-LABEL: @ashrsgt_01_09_exact(
2748; CHECK-NEXT:    ret i1 true
2749;
2750  %s = ashr exact i4 %x, 1
2751  %c = icmp sgt i4 %s, 9
2752  ret i1 %c
2753}
2754
2755define i1 @ashrsgt_01_10_exact(i4 %x) {
2756; CHECK-LABEL: @ashrsgt_01_10_exact(
2757; CHECK-NEXT:    ret i1 true
2758;
2759  %s = ashr exact i4 %x, 1
2760  %c = icmp sgt i4 %s, 10
2761  ret i1 %c
2762}
2763
2764define i1 @ashrsgt_01_11_exact(i4 %x) {
2765; CHECK-LABEL: @ashrsgt_01_11_exact(
2766; CHECK-NEXT:    ret i1 true
2767;
2768  %s = ashr exact i4 %x, 1
2769  %c = icmp sgt i4 %s, 11
2770  ret i1 %c
2771}
2772
2773define i1 @ashrsgt_01_12_exact(i4 %x) {
2774; CHECK-LABEL: @ashrsgt_01_12_exact(
2775; CHECK-NEXT:    [[C:%.*]] = icmp ne i4 [[X:%.*]], -8
2776; CHECK-NEXT:    ret i1 [[C]]
2777;
2778  %s = ashr exact i4 %x, 1
2779  %c = icmp sgt i4 %s, 12
2780  ret i1 %c
2781}
2782
2783define i1 @ashrsgt_01_13_exact(i4 %x) {
2784; CHECK-LABEL: @ashrsgt_01_13_exact(
2785; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], -6
2786; CHECK-NEXT:    ret i1 [[C]]
2787;
2788  %s = ashr exact i4 %x, 1
2789  %c = icmp sgt i4 %s, 13
2790  ret i1 %c
2791}
2792
2793define i1 @ashrsgt_01_14_exact(i4 %x) {
2794; CHECK-LABEL: @ashrsgt_01_14_exact(
2795; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], -4
2796; CHECK-NEXT:    ret i1 [[C]]
2797;
2798  %s = ashr exact i4 %x, 1
2799  %c = icmp sgt i4 %s, 14
2800  ret i1 %c
2801}
2802
2803define i1 @ashrsgt_01_15_exact(i4 %x) {
2804; CHECK-LABEL: @ashrsgt_01_15_exact(
2805; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
2806; CHECK-NEXT:    ret i1 [[C]]
2807;
2808  %s = ashr exact i4 %x, 1
2809  %c = icmp sgt i4 %s, 15
2810  ret i1 %c
2811}
2812
2813define i1 @ashrsgt_02_00_exact(i4 %x) {
2814; CHECK-LABEL: @ashrsgt_02_00_exact(
2815; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], 0
2816; CHECK-NEXT:    ret i1 [[C]]
2817;
2818  %s = ashr exact i4 %x, 2
2819  %c = icmp sgt i4 %s, 0
2820  ret i1 %c
2821}
2822
2823define i1 @ashrsgt_02_01_exact(i4 %x) {
2824; CHECK-LABEL: @ashrsgt_02_01_exact(
2825; CHECK-NEXT:    ret i1 false
2826;
2827  %s = ashr exact i4 %x, 2
2828  %c = icmp sgt i4 %s, 1
2829  ret i1 %c
2830}
2831
2832define i1 @ashrsgt_02_02_exact(i4 %x) {
2833; CHECK-LABEL: @ashrsgt_02_02_exact(
2834; CHECK-NEXT:    ret i1 false
2835;
2836  %s = ashr exact i4 %x, 2
2837  %c = icmp sgt i4 %s, 2
2838  ret i1 %c
2839}
2840
2841define i1 @ashrsgt_02_03_exact(i4 %x) {
2842; CHECK-LABEL: @ashrsgt_02_03_exact(
2843; CHECK-NEXT:    ret i1 false
2844;
2845  %s = ashr exact i4 %x, 2
2846  %c = icmp sgt i4 %s, 3
2847  ret i1 %c
2848}
2849
2850define i1 @ashrsgt_02_04_exact(i4 %x) {
2851; CHECK-LABEL: @ashrsgt_02_04_exact(
2852; CHECK-NEXT:    ret i1 false
2853;
2854  %s = ashr exact i4 %x, 2
2855  %c = icmp sgt i4 %s, 4
2856  ret i1 %c
2857}
2858
2859define i1 @ashrsgt_02_05_exact(i4 %x) {
2860; CHECK-LABEL: @ashrsgt_02_05_exact(
2861; CHECK-NEXT:    ret i1 false
2862;
2863  %s = ashr exact i4 %x, 2
2864  %c = icmp sgt i4 %s, 5
2865  ret i1 %c
2866}
2867
2868define i1 @ashrsgt_02_06_exact(i4 %x) {
2869; CHECK-LABEL: @ashrsgt_02_06_exact(
2870; CHECK-NEXT:    ret i1 false
2871;
2872  %s = ashr exact i4 %x, 2
2873  %c = icmp sgt i4 %s, 6
2874  ret i1 %c
2875}
2876
2877define i1 @ashrsgt_02_07_exact(i4 %x) {
2878; CHECK-LABEL: @ashrsgt_02_07_exact(
2879; CHECK-NEXT:    ret i1 false
2880;
2881  %s = ashr exact i4 %x, 2
2882  %c = icmp sgt i4 %s, 7
2883  ret i1 %c
2884}
2885
2886define i1 @ashrsgt_02_08_exact(i4 %x) {
2887; CHECK-LABEL: @ashrsgt_02_08_exact(
2888; CHECK-NEXT:    ret i1 true
2889;
2890  %s = ashr exact i4 %x, 2
2891  %c = icmp sgt i4 %s, 8
2892  ret i1 %c
2893}
2894
2895define i1 @ashrsgt_02_09_exact(i4 %x) {
2896; CHECK-LABEL: @ashrsgt_02_09_exact(
2897; CHECK-NEXT:    ret i1 true
2898;
2899  %s = ashr exact i4 %x, 2
2900  %c = icmp sgt i4 %s, 9
2901  ret i1 %c
2902}
2903
2904define i1 @ashrsgt_02_10_exact(i4 %x) {
2905; CHECK-LABEL: @ashrsgt_02_10_exact(
2906; CHECK-NEXT:    ret i1 true
2907;
2908  %s = ashr exact i4 %x, 2
2909  %c = icmp sgt i4 %s, 10
2910  ret i1 %c
2911}
2912
2913define i1 @ashrsgt_02_11_exact(i4 %x) {
2914; CHECK-LABEL: @ashrsgt_02_11_exact(
2915; CHECK-NEXT:    ret i1 true
2916;
2917  %s = ashr exact i4 %x, 2
2918  %c = icmp sgt i4 %s, 11
2919  ret i1 %c
2920}
2921
2922define i1 @ashrsgt_02_12_exact(i4 %x) {
2923; CHECK-LABEL: @ashrsgt_02_12_exact(
2924; CHECK-NEXT:    ret i1 true
2925;
2926  %s = ashr exact i4 %x, 2
2927  %c = icmp sgt i4 %s, 12
2928  ret i1 %c
2929}
2930
2931define i1 @ashrsgt_02_13_exact(i4 %x) {
2932; CHECK-LABEL: @ashrsgt_02_13_exact(
2933; CHECK-NEXT:    ret i1 true
2934;
2935  %s = ashr exact i4 %x, 2
2936  %c = icmp sgt i4 %s, 13
2937  ret i1 %c
2938}
2939
2940define i1 @ashrsgt_02_14_exact(i4 %x) {
2941; CHECK-LABEL: @ashrsgt_02_14_exact(
2942; CHECK-NEXT:    [[C:%.*]] = icmp ne i4 [[X:%.*]], -8
2943; CHECK-NEXT:    ret i1 [[C]]
2944;
2945  %s = ashr exact i4 %x, 2
2946  %c = icmp sgt i4 %s, 14
2947  ret i1 %c
2948}
2949
2950define i1 @ashrsgt_02_15_exact(i4 %x) {
2951; CHECK-LABEL: @ashrsgt_02_15_exact(
2952; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
2953; CHECK-NEXT:    ret i1 [[C]]
2954;
2955  %s = ashr exact i4 %x, 2
2956  %c = icmp sgt i4 %s, 15
2957  ret i1 %c
2958}
2959
2960define i1 @ashrsgt_03_00_exact(i4 %x) {
2961; CHECK-LABEL: @ashrsgt_03_00_exact(
2962; CHECK-NEXT:    ret i1 false
2963;
2964  %s = ashr exact i4 %x, 3
2965  %c = icmp sgt i4 %s, 0
2966  ret i1 %c
2967}
2968
2969define i1 @ashrsgt_03_01_exact(i4 %x) {
2970; CHECK-LABEL: @ashrsgt_03_01_exact(
2971; CHECK-NEXT:    ret i1 false
2972;
2973  %s = ashr exact i4 %x, 3
2974  %c = icmp sgt i4 %s, 1
2975  ret i1 %c
2976}
2977
2978define i1 @ashrsgt_03_02_exact(i4 %x) {
2979; CHECK-LABEL: @ashrsgt_03_02_exact(
2980; CHECK-NEXT:    ret i1 false
2981;
2982  %s = ashr exact i4 %x, 3
2983  %c = icmp sgt i4 %s, 2
2984  ret i1 %c
2985}
2986
2987define i1 @ashrsgt_03_03_exact(i4 %x) {
2988; CHECK-LABEL: @ashrsgt_03_03_exact(
2989; CHECK-NEXT:    ret i1 false
2990;
2991  %s = ashr exact i4 %x, 3
2992  %c = icmp sgt i4 %s, 3
2993  ret i1 %c
2994}
2995
2996define i1 @ashrsgt_03_04_exact(i4 %x) {
2997; CHECK-LABEL: @ashrsgt_03_04_exact(
2998; CHECK-NEXT:    ret i1 false
2999;
3000  %s = ashr exact i4 %x, 3
3001  %c = icmp sgt i4 %s, 4
3002  ret i1 %c
3003}
3004
3005define i1 @ashrsgt_03_05_exact(i4 %x) {
3006; CHECK-LABEL: @ashrsgt_03_05_exact(
3007; CHECK-NEXT:    ret i1 false
3008;
3009  %s = ashr exact i4 %x, 3
3010  %c = icmp sgt i4 %s, 5
3011  ret i1 %c
3012}
3013
3014define i1 @ashrsgt_03_06_exact(i4 %x) {
3015; CHECK-LABEL: @ashrsgt_03_06_exact(
3016; CHECK-NEXT:    ret i1 false
3017;
3018  %s = ashr exact i4 %x, 3
3019  %c = icmp sgt i4 %s, 6
3020  ret i1 %c
3021}
3022
3023define i1 @ashrsgt_03_07_exact(i4 %x) {
3024; CHECK-LABEL: @ashrsgt_03_07_exact(
3025; CHECK-NEXT:    ret i1 false
3026;
3027  %s = ashr exact i4 %x, 3
3028  %c = icmp sgt i4 %s, 7
3029  ret i1 %c
3030}
3031
3032define i1 @ashrsgt_03_08_exact(i4 %x) {
3033; CHECK-LABEL: @ashrsgt_03_08_exact(
3034; CHECK-NEXT:    ret i1 true
3035;
3036  %s = ashr exact i4 %x, 3
3037  %c = icmp sgt i4 %s, 8
3038  ret i1 %c
3039}
3040
3041define i1 @ashrsgt_03_09_exact(i4 %x) {
3042; CHECK-LABEL: @ashrsgt_03_09_exact(
3043; CHECK-NEXT:    ret i1 true
3044;
3045  %s = ashr exact i4 %x, 3
3046  %c = icmp sgt i4 %s, 9
3047  ret i1 %c
3048}
3049
3050define i1 @ashrsgt_03_10_exact(i4 %x) {
3051; CHECK-LABEL: @ashrsgt_03_10_exact(
3052; CHECK-NEXT:    ret i1 true
3053;
3054  %s = ashr exact i4 %x, 3
3055  %c = icmp sgt i4 %s, 10
3056  ret i1 %c
3057}
3058
3059define i1 @ashrsgt_03_11_exact(i4 %x) {
3060; CHECK-LABEL: @ashrsgt_03_11_exact(
3061; CHECK-NEXT:    ret i1 true
3062;
3063  %s = ashr exact i4 %x, 3
3064  %c = icmp sgt i4 %s, 11
3065  ret i1 %c
3066}
3067
3068define i1 @ashrsgt_03_12_exact(i4 %x) {
3069; CHECK-LABEL: @ashrsgt_03_12_exact(
3070; CHECK-NEXT:    ret i1 true
3071;
3072  %s = ashr exact i4 %x, 3
3073  %c = icmp sgt i4 %s, 12
3074  ret i1 %c
3075}
3076
3077define i1 @ashrsgt_03_13_exact(i4 %x) {
3078; CHECK-LABEL: @ashrsgt_03_13_exact(
3079; CHECK-NEXT:    ret i1 true
3080;
3081  %s = ashr exact i4 %x, 3
3082  %c = icmp sgt i4 %s, 13
3083  ret i1 %c
3084}
3085
3086define i1 @ashrsgt_03_14_exact(i4 %x) {
3087; CHECK-LABEL: @ashrsgt_03_14_exact(
3088; CHECK-NEXT:    ret i1 true
3089;
3090  %s = ashr exact i4 %x, 3
3091  %c = icmp sgt i4 %s, 14
3092  ret i1 %c
3093}
3094
3095define i1 @ashrsgt_03_15_exact(i4 %x) {
3096; CHECK-LABEL: @ashrsgt_03_15_exact(
3097; CHECK-NEXT:    [[C:%.*]] = icmp sgt i4 [[X:%.*]], -1
3098; CHECK-NEXT:    ret i1 [[C]]
3099;
3100  %s = ashr exact i4 %x, 3
3101  %c = icmp sgt i4 %s, 15
3102  ret i1 %c
3103}
3104
3105define i1 @ashrslt_01_00_exact(i4 %x) {
3106; CHECK-LABEL: @ashrslt_01_00_exact(
3107; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
3108; CHECK-NEXT:    ret i1 [[C]]
3109;
3110  %s = ashr exact i4 %x, 1
3111  %c = icmp slt i4 %s, 0
3112  ret i1 %c
3113}
3114
3115define i1 @ashrslt_01_01_exact(i4 %x) {
3116; CHECK-LABEL: @ashrslt_01_01_exact(
3117; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], 2
3118; CHECK-NEXT:    ret i1 [[C]]
3119;
3120  %s = ashr exact i4 %x, 1
3121  %c = icmp slt i4 %s, 1
3122  ret i1 %c
3123}
3124
3125define i1 @ashrslt_01_02_exact(i4 %x) {
3126; CHECK-LABEL: @ashrslt_01_02_exact(
3127; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], 4
3128; CHECK-NEXT:    ret i1 [[C]]
3129;
3130  %s = ashr exact i4 %x, 1
3131  %c = icmp slt i4 %s, 2
3132  ret i1 %c
3133}
3134
3135define i1 @ashrslt_01_03_exact(i4 %x) {
3136; CHECK-LABEL: @ashrslt_01_03_exact(
3137; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], 6
3138; CHECK-NEXT:    ret i1 [[C]]
3139;
3140  %s = ashr exact i4 %x, 1
3141  %c = icmp slt i4 %s, 3
3142  ret i1 %c
3143}
3144
3145define i1 @ashrslt_01_04_exact(i4 %x) {
3146; CHECK-LABEL: @ashrslt_01_04_exact(
3147; CHECK-NEXT:    ret i1 true
3148;
3149  %s = ashr exact i4 %x, 1
3150  %c = icmp slt i4 %s, 4
3151  ret i1 %c
3152}
3153
3154define i1 @ashrslt_01_05_exact(i4 %x) {
3155; CHECK-LABEL: @ashrslt_01_05_exact(
3156; CHECK-NEXT:    ret i1 true
3157;
3158  %s = ashr exact i4 %x, 1
3159  %c = icmp slt i4 %s, 5
3160  ret i1 %c
3161}
3162
3163define i1 @ashrslt_01_06_exact(i4 %x) {
3164; CHECK-LABEL: @ashrslt_01_06_exact(
3165; CHECK-NEXT:    ret i1 true
3166;
3167  %s = ashr exact i4 %x, 1
3168  %c = icmp slt i4 %s, 6
3169  ret i1 %c
3170}
3171
3172define i1 @ashrslt_01_07_exact(i4 %x) {
3173; CHECK-LABEL: @ashrslt_01_07_exact(
3174; CHECK-NEXT:    ret i1 true
3175;
3176  %s = ashr exact i4 %x, 1
3177  %c = icmp slt i4 %s, 7
3178  ret i1 %c
3179}
3180
3181define i1 @ashrslt_01_08_exact(i4 %x) {
3182; CHECK-LABEL: @ashrslt_01_08_exact(
3183; CHECK-NEXT:    ret i1 false
3184;
3185  %s = ashr exact i4 %x, 1
3186  %c = icmp slt i4 %s, 8
3187  ret i1 %c
3188}
3189
3190define i1 @ashrslt_01_09_exact(i4 %x) {
3191; CHECK-LABEL: @ashrslt_01_09_exact(
3192; CHECK-NEXT:    ret i1 false
3193;
3194  %s = ashr exact i4 %x, 1
3195  %c = icmp slt i4 %s, 9
3196  ret i1 %c
3197}
3198
3199define i1 @ashrslt_01_10_exact(i4 %x) {
3200; CHECK-LABEL: @ashrslt_01_10_exact(
3201; CHECK-NEXT:    ret i1 false
3202;
3203  %s = ashr exact i4 %x, 1
3204  %c = icmp slt i4 %s, 10
3205  ret i1 %c
3206}
3207
3208define i1 @ashrslt_01_11_exact(i4 %x) {
3209; CHECK-LABEL: @ashrslt_01_11_exact(
3210; CHECK-NEXT:    ret i1 false
3211;
3212  %s = ashr exact i4 %x, 1
3213  %c = icmp slt i4 %s, 11
3214  ret i1 %c
3215}
3216
3217define i1 @ashrslt_01_12_exact(i4 %x) {
3218; CHECK-LABEL: @ashrslt_01_12_exact(
3219; CHECK-NEXT:    ret i1 false
3220;
3221  %s = ashr exact i4 %x, 1
3222  %c = icmp slt i4 %s, 12
3223  ret i1 %c
3224}
3225
3226define i1 @ashrslt_01_13_exact(i4 %x) {
3227; CHECK-LABEL: @ashrslt_01_13_exact(
3228; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], -6
3229; CHECK-NEXT:    ret i1 [[C]]
3230;
3231  %s = ashr exact i4 %x, 1
3232  %c = icmp slt i4 %s, 13
3233  ret i1 %c
3234}
3235
3236define i1 @ashrslt_01_14_exact(i4 %x) {
3237; CHECK-LABEL: @ashrslt_01_14_exact(
3238; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], -4
3239; CHECK-NEXT:    ret i1 [[C]]
3240;
3241  %s = ashr exact i4 %x, 1
3242  %c = icmp slt i4 %s, 14
3243  ret i1 %c
3244}
3245
3246define i1 @ashrslt_01_15_exact(i4 %x) {
3247; CHECK-LABEL: @ashrslt_01_15_exact(
3248; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], -2
3249; CHECK-NEXT:    ret i1 [[C]]
3250;
3251  %s = ashr exact i4 %x, 1
3252  %c = icmp slt i4 %s, 15
3253  ret i1 %c
3254}
3255
3256define i1 @ashrslt_02_00_exact(i4 %x) {
3257; CHECK-LABEL: @ashrslt_02_00_exact(
3258; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
3259; CHECK-NEXT:    ret i1 [[C]]
3260;
3261  %s = ashr exact i4 %x, 2
3262  %c = icmp slt i4 %s, 0
3263  ret i1 %c
3264}
3265
3266define i1 @ashrslt_02_01_exact(i4 %x) {
3267; CHECK-LABEL: @ashrslt_02_01_exact(
3268; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], 4
3269; CHECK-NEXT:    ret i1 [[C]]
3270;
3271  %s = ashr exact i4 %x, 2
3272  %c = icmp slt i4 %s, 1
3273  ret i1 %c
3274}
3275
3276define i1 @ashrslt_02_02_exact(i4 %x) {
3277; CHECK-LABEL: @ashrslt_02_02_exact(
3278; CHECK-NEXT:    ret i1 true
3279;
3280  %s = ashr exact i4 %x, 2
3281  %c = icmp slt i4 %s, 2
3282  ret i1 %c
3283}
3284
3285define i1 @ashrslt_02_03_exact(i4 %x) {
3286; CHECK-LABEL: @ashrslt_02_03_exact(
3287; CHECK-NEXT:    ret i1 true
3288;
3289  %s = ashr exact i4 %x, 2
3290  %c = icmp slt i4 %s, 3
3291  ret i1 %c
3292}
3293
3294define i1 @ashrslt_02_04_exact(i4 %x) {
3295; CHECK-LABEL: @ashrslt_02_04_exact(
3296; CHECK-NEXT:    ret i1 true
3297;
3298  %s = ashr exact i4 %x, 2
3299  %c = icmp slt i4 %s, 4
3300  ret i1 %c
3301}
3302
3303define i1 @ashrslt_02_05_exact(i4 %x) {
3304; CHECK-LABEL: @ashrslt_02_05_exact(
3305; CHECK-NEXT:    ret i1 true
3306;
3307  %s = ashr exact i4 %x, 2
3308  %c = icmp slt i4 %s, 5
3309  ret i1 %c
3310}
3311
3312define i1 @ashrslt_02_06_exact(i4 %x) {
3313; CHECK-LABEL: @ashrslt_02_06_exact(
3314; CHECK-NEXT:    ret i1 true
3315;
3316  %s = ashr exact i4 %x, 2
3317  %c = icmp slt i4 %s, 6
3318  ret i1 %c
3319}
3320
3321define i1 @ashrslt_02_07_exact(i4 %x) {
3322; CHECK-LABEL: @ashrslt_02_07_exact(
3323; CHECK-NEXT:    ret i1 true
3324;
3325  %s = ashr exact i4 %x, 2
3326  %c = icmp slt i4 %s, 7
3327  ret i1 %c
3328}
3329
3330define i1 @ashrslt_02_08_exact(i4 %x) {
3331; CHECK-LABEL: @ashrslt_02_08_exact(
3332; CHECK-NEXT:    ret i1 false
3333;
3334  %s = ashr exact i4 %x, 2
3335  %c = icmp slt i4 %s, 8
3336  ret i1 %c
3337}
3338
3339define i1 @ashrslt_02_09_exact(i4 %x) {
3340; CHECK-LABEL: @ashrslt_02_09_exact(
3341; CHECK-NEXT:    ret i1 false
3342;
3343  %s = ashr exact i4 %x, 2
3344  %c = icmp slt i4 %s, 9
3345  ret i1 %c
3346}
3347
3348define i1 @ashrslt_02_10_exact(i4 %x) {
3349; CHECK-LABEL: @ashrslt_02_10_exact(
3350; CHECK-NEXT:    ret i1 false
3351;
3352  %s = ashr exact i4 %x, 2
3353  %c = icmp slt i4 %s, 10
3354  ret i1 %c
3355}
3356
3357define i1 @ashrslt_02_11_exact(i4 %x) {
3358; CHECK-LABEL: @ashrslt_02_11_exact(
3359; CHECK-NEXT:    ret i1 false
3360;
3361  %s = ashr exact i4 %x, 2
3362  %c = icmp slt i4 %s, 11
3363  ret i1 %c
3364}
3365
3366define i1 @ashrslt_02_12_exact(i4 %x) {
3367; CHECK-LABEL: @ashrslt_02_12_exact(
3368; CHECK-NEXT:    ret i1 false
3369;
3370  %s = ashr exact i4 %x, 2
3371  %c = icmp slt i4 %s, 12
3372  ret i1 %c
3373}
3374
3375define i1 @ashrslt_02_13_exact(i4 %x) {
3376; CHECK-LABEL: @ashrslt_02_13_exact(
3377; CHECK-NEXT:    ret i1 false
3378;
3379  %s = ashr exact i4 %x, 2
3380  %c = icmp slt i4 %s, 13
3381  ret i1 %c
3382}
3383
3384define i1 @ashrslt_02_14_exact(i4 %x) {
3385; CHECK-LABEL: @ashrslt_02_14_exact(
3386; CHECK-NEXT:    ret i1 false
3387;
3388  %s = ashr exact i4 %x, 2
3389  %c = icmp slt i4 %s, 14
3390  ret i1 %c
3391}
3392
3393define i1 @ashrslt_02_15_exact(i4 %x) {
3394; CHECK-LABEL: @ashrslt_02_15_exact(
3395; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], -4
3396; CHECK-NEXT:    ret i1 [[C]]
3397;
3398  %s = ashr exact i4 %x, 2
3399  %c = icmp slt i4 %s, 15
3400  ret i1 %c
3401}
3402
3403define i1 @ashrslt_03_00_exact(i4 %x) {
3404; CHECK-LABEL: @ashrslt_03_00_exact(
3405; CHECK-NEXT:    [[C:%.*]] = icmp slt i4 [[X:%.*]], 0
3406; CHECK-NEXT:    ret i1 [[C]]
3407;
3408  %s = ashr exact i4 %x, 3
3409  %c = icmp slt i4 %s, 0
3410  ret i1 %c
3411}
3412
3413define i1 @ashrslt_03_01_exact(i4 %x) {
3414; CHECK-LABEL: @ashrslt_03_01_exact(
3415; CHECK-NEXT:    ret i1 true
3416;
3417  %s = ashr exact i4 %x, 3
3418  %c = icmp slt i4 %s, 1
3419  ret i1 %c
3420}
3421
3422define i1 @ashrslt_03_02_exact(i4 %x) {
3423; CHECK-LABEL: @ashrslt_03_02_exact(
3424; CHECK-NEXT:    ret i1 true
3425;
3426  %s = ashr exact i4 %x, 3
3427  %c = icmp slt i4 %s, 2
3428  ret i1 %c
3429}
3430
3431define i1 @ashrslt_03_03_exact(i4 %x) {
3432; CHECK-LABEL: @ashrslt_03_03_exact(
3433; CHECK-NEXT:    ret i1 true
3434;
3435  %s = ashr exact i4 %x, 3
3436  %c = icmp slt i4 %s, 3
3437  ret i1 %c
3438}
3439
3440define i1 @ashrslt_03_04_exact(i4 %x) {
3441; CHECK-LABEL: @ashrslt_03_04_exact(
3442; CHECK-NEXT:    ret i1 true
3443;
3444  %s = ashr exact i4 %x, 3
3445  %c = icmp slt i4 %s, 4
3446  ret i1 %c
3447}
3448
3449define i1 @ashrslt_03_05_exact(i4 %x) {
3450; CHECK-LABEL: @ashrslt_03_05_exact(
3451; CHECK-NEXT:    ret i1 true
3452;
3453  %s = ashr exact i4 %x, 3
3454  %c = icmp slt i4 %s, 5
3455  ret i1 %c
3456}
3457
3458define i1 @ashrslt_03_06_exact(i4 %x) {
3459; CHECK-LABEL: @ashrslt_03_06_exact(
3460; CHECK-NEXT:    ret i1 true
3461;
3462  %s = ashr exact i4 %x, 3
3463  %c = icmp slt i4 %s, 6
3464  ret i1 %c
3465}
3466
3467define i1 @ashrslt_03_07_exact(i4 %x) {
3468; CHECK-LABEL: @ashrslt_03_07_exact(
3469; CHECK-NEXT:    ret i1 true
3470;
3471  %s = ashr exact i4 %x, 3
3472  %c = icmp slt i4 %s, 7
3473  ret i1 %c
3474}
3475
3476define i1 @ashrslt_03_08_exact(i4 %x) {
3477; CHECK-LABEL: @ashrslt_03_08_exact(
3478; CHECK-NEXT:    ret i1 false
3479;
3480  %s = ashr exact i4 %x, 3
3481  %c = icmp slt i4 %s, 8
3482  ret i1 %c
3483}
3484
3485define i1 @ashrslt_03_09_exact(i4 %x) {
3486; CHECK-LABEL: @ashrslt_03_09_exact(
3487; CHECK-NEXT:    ret i1 false
3488;
3489  %s = ashr exact i4 %x, 3
3490  %c = icmp slt i4 %s, 9
3491  ret i1 %c
3492}
3493
3494define i1 @ashrslt_03_10_exact(i4 %x) {
3495; CHECK-LABEL: @ashrslt_03_10_exact(
3496; CHECK-NEXT:    ret i1 false
3497;
3498  %s = ashr exact i4 %x, 3
3499  %c = icmp slt i4 %s, 10
3500  ret i1 %c
3501}
3502
3503define i1 @ashrslt_03_11_exact(i4 %x) {
3504; CHECK-LABEL: @ashrslt_03_11_exact(
3505; CHECK-NEXT:    ret i1 false
3506;
3507  %s = ashr exact i4 %x, 3
3508  %c = icmp slt i4 %s, 11
3509  ret i1 %c
3510}
3511
3512define i1 @ashrslt_03_12_exact(i4 %x) {
3513; CHECK-LABEL: @ashrslt_03_12_exact(
3514; CHECK-NEXT:    ret i1 false
3515;
3516  %s = ashr exact i4 %x, 3
3517  %c = icmp slt i4 %s, 12
3518  ret i1 %c
3519}
3520
3521define i1 @ashrslt_03_13_exact(i4 %x) {
3522; CHECK-LABEL: @ashrslt_03_13_exact(
3523; CHECK-NEXT:    ret i1 false
3524;
3525  %s = ashr exact i4 %x, 3
3526  %c = icmp slt i4 %s, 13
3527  ret i1 %c
3528}
3529
3530define i1 @ashrslt_03_14_exact(i4 %x) {
3531; CHECK-LABEL: @ashrslt_03_14_exact(
3532; CHECK-NEXT:    ret i1 false
3533;
3534  %s = ashr exact i4 %x, 3
3535  %c = icmp slt i4 %s, 14
3536  ret i1 %c
3537}
3538
3539define i1 @ashrslt_03_15_exact(i4 %x) {
3540; CHECK-LABEL: @ashrslt_03_15_exact(
3541; CHECK-NEXT:    ret i1 false
3542;
3543  %s = ashr exact i4 %x, 3
3544  %c = icmp slt i4 %s, 15
3545  ret i1 %c
3546}
3547
3548