Lines Matching full:start
6 define i1 @test_shl_const_nuw_unsigned_1(i8 %start, i8 %high) {
9 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
15 %start.shl.4 = shl nuw i8 %start, 4
16 %c.1 = icmp ult i8 %start.shl.4, %high
19 %t.1 = icmp ult i8 %start, %high
23 define i1 @test_shl_const_nuw_unsigned_2(i8 %start, i8 %high) {
26 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
29 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
33 %start.shl.4 = shl nuw i8 %start, 4
34 %c.1 = icmp ult i8 %start.shl.4, %high
37 %start.shl.2 = shl nuw i8 %start, 2
38 %t = icmp ult i8 %start.shl.2, %high
42 define i1 @test_shl_const_nuw_unsigned_3(i8 %start, i8 %high) {
45 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
48 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
49 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
53 %start.shl.4 = shl nuw i8 %start, 4
54 %c.1 = icmp ult i8 %start.shl.4, %high
57 %start.shl.2 = shl nuw i8 %start, 2
58 %start.add.1 = add nuw i8 %start, %start
59 %t = icmp ule i8 %start.add.1, %start.shl.2
63 define i1 @test_shl_const_nuw_unsigned_4(i8 %start, i8 %high) {
66 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
69 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
70 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
75 %start.shl.4 = shl nuw i8 %start, 4
76 %c.1 = icmp ult i8 %start.shl.4, %high
79 %start.shl.2 = shl nuw i8 %start, 2
80 %start.add.1 = add nuw i8 %start, %start
81 %f = icmp ult i8 %start.add.1, %start.shl.2
86 define i1 @test_shl_const_nuw_unsigned_5(i8 %start, i8 %high) {
89 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
92 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
97 %start.shl.4 = shl nuw i8 %start, 4
98 %c.1 = icmp ult i8 %start.shl.4, %high
101 %start.add.1 = add nuw i8 %start, %start
102 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
103 %t.4 = icmp ule i8 %start.add.2, %start.shl.4
107 define i1 @test_shl_const_nuw_unsigned_6(i8 %start, i8 %high) {
110 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
113 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
119 %start.shl.4 = shl nuw i8 %start, 4
120 %c.1 = icmp ult i8 %start.shl.4, %high
123 %start.add.1 = add nuw i8 %start, %start
124 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
125 %f.2 = icmp ult i8 %start.add.2, %start.shl.4
129 define i1 @test_shl_const_nuw_unsigned_7(i8 %start, i8 %high) {
132 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
135 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
136 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
143 %start.shl.4 = shl nuw i8 %start, 4
144 %c.1 = icmp ult i8 %start.shl.4, %high
147 %start.shl.2 = shl nuw i8 %start, 2
148 %start.add.1 = add nuw i8 %start, %start
149 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
150 %start.add.2.1 = add nuw i8 %start.add.2, 1
151 %f.3 = icmp ule i8 %start.add.2.1, %start.shl.4
155 define i1 @test_shl_const_nuw_unsigned_8(i8 %start, i8 %high) {
158 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
161 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
162 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
165 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nuw i8 [[START]], 3
169 %start.shl.4 = shl nuw i8 %start, 4
170 %c.1 = icmp ult i8 %start.shl.4, %high
173 %start.shl.2 = shl nuw i8 %start, 2
174 %start.add.1 = add nuw i8 %start, %start
175 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
176 %start.add.2.1 = add nuw i8 %start.add.2, 1
177 %start.shl.3 = shl nuw i8 %start, 3
178 %t.5 = icmp ule i8 %start.add.1, %start.shl.3
182 define i1 @test_shl_const_nuw_unsigned_9(i8 %start, i8 %high) {
185 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nuw i8 [[START:%.*]], 4
188 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
189 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
192 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nuw i8 [[START]], 3
197 %start.shl.4 = shl nuw i8 %start, 4
198 %c.1 = icmp ult i8 %start.shl.4, %high
201 %start.shl.2 = shl nuw i8 %start, 2
202 %start.add.1 = add nuw i8 %start, %start
203 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
204 %start.add.2.1 = add nuw i8 %start.add.2, 1
205 %start.shl.3 = shl nuw i8 %start, 3
206 %f.5 = icmp ult i8 %start.add.2, %start.shl.3
210 define i1 @test_shl_const_nuw_unsigned_10(i8 %start, i8 %high) {
213 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl nuw i8 [[START:%.*]], 5
214 ; CHECK-NEXT: [[C_0:%.*]] = icmp ult i8 [[START]], [[START_SHL_5]]
216 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nuw i8 [[START]], 3
220 %start.shl.5 = shl nuw i8 %start, 5
221 %c.0 = icmp ult i8 %start, %start.shl.5
224 %start.shl.3 = shl nuw i8 %start, 3
225 %t.1 = icmp ule i8 %start.shl.3, %start.shl.5
229 define i1 @test_shl_const_nuw_unsigned_11(i8 %start, i8 %high) {
232 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl nuw i8 [[START:%.*]], 5
233 ; CHECK-NEXT: [[C_0:%.*]] = icmp ult i8 [[START]], [[START_SHL_5]]
235 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nuw i8 [[START]], 3
239 %start.shl.5 = shl nuw i8 %start, 5
240 %c.0 = icmp ult i8 %start, %start.shl.5
243 %start.shl.3 = shl nuw i8 %start, 3
244 %c.1 = icmp ule i8 %start.shl.5, %start.shl.3
248 define i1 @test_shl_const_nuw_unsigned_12(i8 %start) {
251 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nuw i8 [[START:%.*]], 3
252 ; CHECK-NEXT: [[C_1:%.*]] = icmp ult i8 [[START]], [[START_SHL_3]]
254 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl nuw i8 [[START]], 5
258 %start.shl.3 = shl nuw i8 %start, 3
259 %c.1 = icmp ult i8 %start, %start.shl.3
262 %start.shl.5 = shl nuw i8 %start, 5
263 %t.1 = icmp ule i8 %start.shl.3, %start.shl.5
267 define i1 @test_shl_const_nuw_unsigned_13(i8 %start) {
270 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl i8 [[START:%.*]], 3
271 ; CHECK-NEXT: [[C_1:%.*]] = icmp ult i8 [[START]], [[START_SHL_3]]
273 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl i8 [[START]], 5
278 %start.shl.3 = shl i8 %start, 3
279 %c.1 = icmp ult i8 %start, %start.shl.3
282 %start.shl.5 = shl i8 %start, 5
283 %f.1 = icmp ule i8 %start.shl.5, %start.shl.3
287 define i1 @test_shl_add_const_nuw_unsigned_1(i8 %start, i8 %high) {
290 ; CHECK-NEXT: [[ADD:%.*]] = add nuw i8 [[START:%.*]], 3
297 %add = add nuw i8 %start, 3
298 %start.shl.4 = shl nuw i8 %add, 4
299 %c.1 = icmp ult i8 %start.shl.4, %high
302 %t.1 = icmp ult i8 %start, %high
306 define i1 @test_shl_add_const_nuw_unsigned_2(i8 %start, i8 %high) {
309 ; CHECK-NEXT: [[ADD:%.*]] = add nuw i8 [[START:%.*]], 3
313 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
317 %add = add nuw i8 %start, 3
318 %start.shl.4 = shl nuw i8 %add, 4
319 %c.1 = icmp ult i8 %start.shl.4, %high
322 %start.shl.2 = shl nuw i8 %start, 2
323 %t.2 = icmp ult i8 %start.shl.2, %high
327 define i1 @test_shl_add_const_nuw_unsigned_3(i8 %start, i8 %high) {
330 ; CHECK-NEXT: [[ADD:%.*]] = add nuw i8 [[START:%.*]], 3
334 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
339 %add = add nuw i8 %start, 3
340 %start.shl.4 = shl nuw i8 %add, 4
341 %c.1 = icmp ult i8 %start.shl.4, %high
344 %start.add.1 = add nuw i8 %start, %start
345 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
346 %t.3 = icmp ule i8 %start.add.2, %start.shl.4
350 define i1 @test_shl_add_const_nuw_unsigned_4(i8 %start, i8 %high) {
353 ; CHECK-NEXT: [[ADD:%.*]] = add nuw i8 [[START:%.*]], 3
357 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nuw i8 [[START]], 2
358 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
363 %add = add nuw i8 %start, 3
364 %start.shl.4 = shl nuw i8 %add, 4
365 %c.1 = icmp ult i8 %start.shl.4, %high
368 %start.shl.2 = shl nuw i8 %start, 2
369 %start.add.1 = add nuw i8 %start, %start
370 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
371 %t.4 = icmp ult i8 %start.add.2, %start.shl.4
375 define i1 @test_shl_add_const_nuw_unsigned_5(i8 %start, i8 %high) {
378 ; CHECK-NEXT: [[ADD:%.*]] = add nuw i8 [[START:%.*]], 3
382 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
388 %add = add nuw i8 %start, 3
389 %start.shl.4 = shl nuw i8 %add, 4
390 %c.1 = icmp ult i8 %start.shl.4, %high
393 %start.add.1 = add nuw i8 %start, %start
394 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
395 %start.add.2.12 = add nuw i8 %start.add.2, 12
396 %t.5 = icmp ule i8 %start.add.2.12, %start.shl.4
400 define i1 @test_shl_add_const_nuw_unsigned_6(i8 %start, i8 %high) {
403 ; CHECK-NEXT: [[ADD:%.*]] = add nuw i8 [[START:%.*]], 3
407 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nuw i8 [[START]], [[START]]
413 %add = add nuw i8 %start, 3
414 %start.shl.4 = shl nuw i8 %add, 4
415 %c.1 = icmp ult i8 %start.shl.4, %high
418 %start.add.1 = add nuw i8 %start, %start
419 %start.add.2 = add nuw i8 %start.add.1, %start.add.1
420 %start.add.2.13 = add nuw i8 %start.add.2, 13
421 %f.1 = icmp ule i8 %start.add.2.13, %start.shl.4
425 define i1 @test_shl_const_nsw_unsigned_1(i8 %start, i8 %high) {
428 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
431 ; CHECK-NEXT: [[T_1:%.*]] = icmp ult i8 [[START]], [[HIGH]]
435 %start.shl.4 = shl nsw i8 %start, 4
436 %c.1 = icmp ult i8 %start.shl.4, %high
439 %t.1 = icmp ult i8 %start, %high
443 define i1 @test_shl_const_nsw_unsigned_2(i8 %start, i8 %high) {
446 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
449 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
454 %start.shl.4 = shl nsw i8 %start, 4
455 %c.1 = icmp ult i8 %start.shl.4, %high
458 %start.shl.2 = shl nsw i8 %start, 2
459 %t = icmp ult i8 %start.shl.2, %high
463 define i1 @test_shl_const_nsw_unsigned_3(i8 %start, i8 %high) {
466 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
469 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
470 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
475 %start.shl.4 = shl nsw i8 %start, 4
476 %c.1 = icmp ult i8 %start.shl.4, %high
479 %start.shl.2 = shl nsw i8 %start, 2
480 %start.add.1 = add nsw i8 %start, %start
481 %t = icmp ule i8 %start.add.1, %start.shl.2
486 define i1 @test_shl_const_nsw_unsigned_4(i8 %start, i8 %high) {
489 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
492 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
493 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
498 %start.shl.4 = shl nsw i8 %start, 4
499 %c.1 = icmp ult i8 %start.shl.4, %high
502 %start.shl.2 = shl nsw i8 %start, 2
503 %start.add.1 = add nsw i8 %start, %start
504 %f = icmp ult i8 %start.add.1, %start.shl.2
509 define i1 @test_shl_const_nsw_unsigned_5(i8 %start, i8 %high) {
512 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
515 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
521 %start.shl.4 = shl nsw i8 %start, 4
522 %c.1 = icmp ult i8 %start.shl.4, %high
525 %start.add.1 = add nsw i8 %start, %start
526 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
527 %t.4 = icmp ule i8 %start.add.2, %start.shl.4
531 define i1 @test_shl_const_nsw_unsigned_6(i8 %start, i8 %high) {
534 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
537 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
543 %start.shl.4 = shl nsw i8 %start, 4
544 %c.1 = icmp ult i8 %start.shl.4, %high
547 %start.add.1 = add nsw i8 %start, %start
548 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
549 %f.2 = icmp ult i8 %start.add.2, %start.shl.4
553 define i1 @test_shl_const_nsw_unsigned_7(i8 %start, i8 %high) {
556 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
559 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
560 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
567 %start.shl.4 = shl nsw i8 %start, 4
568 %c.1 = icmp ult i8 %start.shl.4, %high
571 %start.shl.2 = shl nsw i8 %start, 2
572 %start.add.1 = add nsw i8 %start, %start
573 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
574 %start.add.2.1 = add nsw i8 %start.add.2, 1
575 %f.3 = icmp ule i8 %start.add.2.1, %start.shl.4
579 define i1 @test_shl_const_nsw_unsigned_8(i8 %start, i8 %high) {
582 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
585 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
586 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
589 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nsw i8 [[START]], 3
594 %start.shl.4 = shl nsw i8 %start, 4
595 %c.1 = icmp ult i8 %start.shl.4, %high
598 %start.shl.2 = shl nsw i8 %start, 2
599 %start.add.1 = add nsw i8 %start, %start
600 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
601 %start.add.2.1 = add nsw i8 %start.add.2, 1
602 %start.shl.3 = shl nsw i8 %start, 3
603 %t.5 = icmp ule i8 %start.add.1, %start.shl.3
607 define i1 @test_shl_const_nsw_unsigned_9(i8 %start, i8 %high) {
610 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl nsw i8 [[START:%.*]], 4
613 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
614 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
617 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nsw i8 [[START]], 3
622 %start.shl.4 = shl nsw i8 %start, 4
623 %c.1 = icmp ult i8 %start.shl.4, %high
626 %start.shl.2 = shl nsw i8 %start, 2
627 %start.add.1 = add nsw i8 %start, %start
628 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
629 %start.add.2.1 = add nsw i8 %start.add.2, 1
630 %start.shl.3 = shl nsw i8 %start, 3
631 %f.5 = icmp ult i8 %start.add.2, %start.shl.3
635 define i1 @test_shl_const_nsw_unsigned_10(i8 %start, i8 %high) {
638 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl nsw i8 [[START:%.*]], 5
639 ; CHECK-NEXT: [[C_0:%.*]] = icmp ult i8 [[START]], [[START_SHL_5]]
641 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nsw i8 [[START]], 3
646 %start.shl.5 = shl nsw i8 %start, 5
647 %c.0 = icmp ult i8 %start, %start.shl.5
650 %start.shl.3 = shl nsw i8 %start, 3
651 %t.1 = icmp ule i8 %start.shl.3, %start.shl.5
655 define i1 @test_shl_const_nsw_unsigned_11(i8 %start, i8 %high) {
658 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl nsw i8 [[START:%.*]], 5
659 ; CHECK-NEXT: [[C_0:%.*]] = icmp ult i8 [[START]], [[START_SHL_5]]
661 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nsw i8 [[START]], 3
666 %start.shl.5 = shl nsw i8 %start, 5
667 %c.0 = icmp ult i8 %start, %start.shl.5
670 %start.shl.3 = shl nsw i8 %start, 3
671 %c.1 = icmp ule i8 %start.shl.5, %start.shl.3
675 define i1 @test_shl_add_const_nsw_unsigned_1(i8 %start, i8 %high) {
678 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i8 [[START:%.*]], 3
682 ; CHECK-NEXT: [[T_1:%.*]] = icmp ult i8 [[START]], [[HIGH]]
686 %add = add nsw i8 %start, 3
687 %start.shl.4 = shl nsw i8 %add, 4
688 %c.1 = icmp ult i8 %start.shl.4, %high
691 %t.1 = icmp ult i8 %start, %high
695 define i1 @test_shl_add_const_nsw_unsigned_2(i8 %start, i8 %high) {
698 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i8 [[START:%.*]], 3
702 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
707 %add = add nsw i8 %start, 3
708 %start.shl.4 = shl nsw i8 %add, 4
709 %c.1 = icmp ult i8 %start.shl.4, %high
712 %start.shl.2 = shl nsw i8 %start, 2
713 %t.2 = icmp ult i8 %start.shl.2, %high
717 define i1 @test_shl_add_const_nsw_unsigned_3(i8 %start, i8 %high) {
720 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i8 [[START:%.*]], 3
724 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
730 %add = add nsw i8 %start, 3
731 %start.shl.4 = shl nsw i8 %add, 4
732 %c.1 = icmp ult i8 %start.shl.4, %high
735 %start.add.1 = add nsw i8 %start, %start
736 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
737 %t.3 = icmp ule i8 %start.add.2, %start.shl.4
741 define i1 @test_shl_add_const_nsw_unsigned_4(i8 %start, i8 %high) {
744 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i8 [[START:%.*]], 3
748 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl nsw i8 [[START]], 2
749 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
755 %add = add nsw i8 %start, 3
756 %start.shl.4 = shl nsw i8 %add, 4
757 %c.1 = icmp ult i8 %start.shl.4, %high
760 %start.shl.2 = shl nsw i8 %start, 2
761 %start.add.1 = add nsw i8 %start, %start
762 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
763 %t.4 = icmp ult i8 %start.add.2, %start.shl.4
767 define i1 @test_shl_add_const_nsw_unsigned_5(i8 %start, i8 %high) {
770 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i8 [[START:%.*]], 3
774 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
781 %add = add nsw i8 %start, 3
782 %start.shl.4 = shl nsw i8 %add, 4
783 %c.1 = icmp ult i8 %start.shl.4, %high
786 %start.add.1 = add nsw i8 %start, %start
787 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
788 %start.add.2.12 = add nsw i8 %start.add.2, 12
789 %t.5 = icmp ule i8 %start.add.2.12, %start.shl.4
793 define i1 @test_shl_add_const_nsw_unsigned_6(i8 %start, i8 %high) {
796 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i8 [[START:%.*]], 3
800 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add nsw i8 [[START]], [[START]]
807 %add = add nsw i8 %start, 3
808 %start.shl.4 = shl nsw i8 %add, 4
809 %c.1 = icmp ult i8 %start.shl.4, %high
812 %start.add.1 = add nsw i8 %start, %start
813 %start.add.2 = add nsw i8 %start.add.1, %start.add.1
814 %start.add.2.13 = add nsw i8 %start.add.2, 13
815 %f.1 = icmp ule i8 %start.add.2.13, %start.shl.4
819 define i1 @test_shl_const_no_nuw_unsigned_1(i8 %start, i8 %high) {
822 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
825 ; CHECK-NEXT: [[T_1:%.*]] = icmp ult i8 [[START]], [[HIGH]]
829 %start.shl.4 = shl i8 %start, 4
830 %c.1 = icmp ult i8 %start.shl.4, %high
833 %t.1 = icmp ult i8 %start, %high
837 define i1 @test_shl_const_no_nuw_unsigned_2(i8 %start, i8 %high) {
840 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
843 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
848 %start.shl.4 = shl i8 %start, 4
849 %c.1 = icmp ult i8 %start.shl.4, %high
852 %start.shl.2 = shl i8 %start, 2
853 %t = icmp ult i8 %start.shl.2, %high
857 define i1 @test_shl_const_no_nuw_unsigned_3(i8 %start, i8 %high) {
860 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
863 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
864 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
869 %start.shl.4 = shl i8 %start, 4
870 %c.1 = icmp ult i8 %start.shl.4, %high
873 %start.shl.2 = shl i8 %start, 2
874 %start.add.1 = add i8 %start, %start
875 %t = icmp ule i8 %start.add.1, %start.shl.2
880 define i1 @test_shl_const_no_nuw_unsigned_4(i8 %start, i8 %high) {
883 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
886 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
887 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
892 %start.shl.4 = shl i8 %start, 4
893 %c.1 = icmp ult i8 %start.shl.4, %high
896 %start.shl.2 = shl i8 %start, 2
897 %start.add.1 = add i8 %start, %start
898 %f = icmp ult i8 %start.add.1, %start.shl.2
903 define i1 @test_shl_const_no_nuw_unsigned_5(i8 %start, i8 %high) {
906 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
909 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
915 %start.shl.4 = shl i8 %start, 4
916 %c.1 = icmp ult i8 %start.shl.4, %high
919 %start.add.1 = add i8 %start, %start
920 %start.add.2 = add i8 %start.add.1, %start.add.1
921 %t.4 = icmp ule i8 %start.add.2, %start.shl.4
925 define i1 @test_shl_const_no_nuw_unsigned_6(i8 %start, i8 %high) {
928 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
931 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
937 %start.shl.4 = shl i8 %start, 4
938 %c.1 = icmp ult i8 %start.shl.4, %high
941 %start.add.1 = add i8 %start, %start
942 %start.add.2 = add i8 %start.add.1, %start.add.1
943 %f.2 = icmp ult i8 %start.add.2, %start.shl.4
947 define i1 @test_shl_const_no_nuw_unsigned_7(i8 %start, i8 %high) {
950 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
953 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
954 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
961 %start.shl.4 = shl i8 %start, 4
962 %c.1 = icmp ult i8 %start.shl.4, %high
965 %start.shl.2 = shl i8 %start, 2
966 %start.add.1 = add i8 %start, %start
967 %start.add.2 = add i8 %start.add.1, %start.add.1
968 %start.add.2.1 = add i8 %start.add.2, 1
969 %f.3 = icmp ule i8 %start.add.2.1, %start.shl.4
973 define i1 @test_shl_const_no_nuw_unsigned_8(i8 %start, i8 %high) {
976 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
979 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
980 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
983 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl i8 [[START]], 3
988 %start.shl.4 = shl i8 %start, 4
989 %c.1 = icmp ult i8 %start.shl.4, %high
992 %start.shl.2 = shl i8 %start, 2
993 %start.add.1 = add i8 %start, %start
994 %start.add.2 = add i8 %start.add.1, %start.add.1
995 %start.add.2.1 = add i8 %start.add.2, 1
996 %start.shl.3 = shl i8 %start, 3
997 %t.5 = icmp ule i8 %start.add.1, %start.shl.3
1001 define i1 @test_shl_const_no_nuw_unsigned_9(i8 %start, i8 %high) {
1004 ; CHECK-NEXT: [[START_SHL_4:%.*]] = shl i8 [[START:%.*]], 4
1007 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
1008 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
1011 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl i8 [[START]], 3
1016 %start.shl.4 = shl i8 %start, 4
1017 %c.1 = icmp ult i8 %start.shl.4, %high
1020 %start.shl.2 = shl i8 %start, 2
1021 %start.add.1 = add i8 %start, %start
1022 %start.add.2 = add i8 %start.add.1, %start.add.1
1023 %start.add.2.1 = add i8 %start.add.2, 1
1024 %start.shl.3 = shl i8 %start, 3
1025 %f.5 = icmp ult i8 %start.add.2, %start.shl.3
1029 define i1 @test_shl_const_no_nuw_unsigned_10(i8 %start, i8 %high) {
1032 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl i8 [[START:%.*]], 5
1033 ; CHECK-NEXT: [[C_0:%.*]] = icmp ult i8 [[START]], [[START_SHL_5]]
1035 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl i8 [[START]], 3
1040 %start.shl.5 = shl i8 %start, 5
1041 %c.0 = icmp ult i8 %start, %start.shl.5
1044 %start.shl.3 = shl i8 %start, 3
1045 %t.1 = icmp ule i8 %start.shl.3, %start.shl.5
1049 define i1 @test_shl_const_no_nuw_unsigned_11(i8 %start, i8 %high) {
1052 ; CHECK-NEXT: [[START_SHL_5:%.*]] = shl i8 [[START:%.*]], 5
1053 ; CHECK-NEXT: [[C_0:%.*]] = icmp ult i8 [[START]], [[START_SHL_5]]
1055 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl i8 [[START]], 3
1060 %start.shl.5 = shl i8 %start, 5
1061 %c.0 = icmp ult i8 %start, %start.shl.5
1064 %start.shl.3 = shl i8 %start, 3
1065 %c.1 = icmp ule i8 %start.shl.5, %start.shl.3
1069 define i1 @test_shl_add_const_no_nuw_unsigned_1(i8 %start, i8 %high) {
1072 ; CHECK-NEXT: [[ADD:%.*]] = add i8 [[START:%.*]], 3
1076 ; CHECK-NEXT: [[T_1:%.*]] = icmp ult i8 [[START]], [[HIGH]]
1080 %add = add i8 %start, 3
1081 %start.shl.4 = shl i8 %add, 4
1082 %c.1 = icmp ult i8 %start.shl.4, %high
1085 %t.1 = icmp ult i8 %start, %high
1089 define i1 @test_shl_add_const_no_nuw_unsigned_2(i8 %start, i8 %high) {
1092 ; CHECK-NEXT: [[ADD:%.*]] = add i8 [[START:%.*]], 3
1096 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
1101 %add = add i8 %start, 3
1102 %start.shl.4 = shl i8 %add, 4
1103 %c.1 = icmp ult i8 %start.shl.4, %high
1106 %start.shl.2 = shl i8 %start, 2
1107 %t.2 = icmp ult i8 %start.shl.2, %high
1111 define i1 @test_shl_add_const_no_nuw_unsigned_3(i8 %start, i8 %high) {
1114 ; CHECK-NEXT: [[ADD:%.*]] = add i8 [[START:%.*]], 3
1118 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
1124 %add = add i8 %start, 3
1125 %start.shl.4 = shl i8 %add, 4
1126 %c.1 = icmp ult i8 %start.shl.4, %high
1129 %start.add.1 = add i8 %start, %start
1130 %start.add.2 = add i8 %start.add.1, %start.add.1
1131 %t.3 = icmp ule i8 %start.add.2, %start.shl.4
1135 define i1 @test_shl_add_const_no_nuw_unsigned_4(i8 %start, i8 %high) {
1138 ; CHECK-NEXT: [[ADD:%.*]] = add i8 [[START:%.*]], 3
1142 ; CHECK-NEXT: [[START_SHL_2:%.*]] = shl i8 [[START]], 2
1143 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
1149 %add = add i8 %start, 3
1150 %start.shl.4 = shl i8 %add, 4
1151 %c.1 = icmp ult i8 %start.shl.4, %high
1154 %start.shl.2 = shl i8 %start, 2
1155 %start.add.1 = add i8 %start, %start
1156 %start.add.2 = add i8 %start.add.1, %start.add.1
1157 %t.4 = icmp ult i8 %start.add.2, %start.shl.4
1161 define i1 @test_shl_add_const_no_nuw_unsigned_5(i8 %start, i8 %high) {
1164 ; CHECK-NEXT: [[ADD:%.*]] = add i8 [[START:%.*]], 3
1168 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
1175 %add = add i8 %start, 3
1176 %start.shl.4 = shl i8 %add, 4
1177 %c.1 = icmp ult i8 %start.shl.4, %high
1180 %start.add.1 = add i8 %start, %start
1181 %start.add.2 = add i8 %start.add.1, %start.add.1
1182 %start.add.2.12 = add i8 %start.add.2, 12
1183 %t.5 = icmp ule i8 %start.add.2.12, %start.shl.4
1187 define i1 @test_shl_add_const_no_nuw_unsigned_6(i8 %start, i8 %high) {
1190 ; CHECK-NEXT: [[ADD:%.*]] = add i8 [[START:%.*]], 3
1194 ; CHECK-NEXT: [[START_ADD_1:%.*]] = add i8 [[START]], [[START]]
1201 %add = add i8 %start, 3
1202 %start.shl.4 = shl i8 %add, 4
1203 %c.1 = icmp ult i8 %start.shl.4, %high
1206 %start.add.1 = add i8 %start, %start
1207 %start.add.2 = add i8 %start.add.1, %start.add.1
1208 %start.add.2.13 = add i8 %start.add.2, 13
1209 %f.1 = icmp ule i8 %start.add.2.13, %start.shl.4
1213 define i1 @shl_overflow(i64 %start) {
1216 ; CHECK-NEXT: [[PRE_COND:%.*]] = icmp ugt i64 [[START:%.*]], 0
1219 ; CHECK-NEXT: [[TMP0:%.*]] = shl nuw nsw i64 [[START]], -1
1220 ; CHECK-NEXT: [[TMP1:%.*]] = icmp uge i64 [[TMP0]], [[START]]
1226 %pre.cond = icmp ugt i64 %start, 0
1230 %0 = shl nuw nsw i64 %start, -1
1231 %1 = icmp uge i64 %0, %start
1278 define i1 @shl_nsw_x8_slt_x7(i8 %start, i8 %high) {
1282 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nsw i8 [[START:%.*]], 3
1285 ; CHECK-NEXT: [[START_MUL_7:%.*]] = mul nsw i8 [[START]], 7
1291 %start.shl.3 = shl nsw i8 %start, 3
1292 %c.1 = icmp slt i8 %start.shl.3, %high
1295 %start.mul.7 = mul nsw i8 %start, 7
1296 %t.1 = icmp slt i8 %start.mul.7, %high
1300 define i1 @shl_nsw_x8_not_slt_x9(i8 %start, i8 %high) {
1304 ; CHECK-NEXT: [[START_SHL_3:%.*]] = shl nsw i8 [[START:%.*]], 3
1307 ; CHECK-NEXT: [[START_MUL_9:%.*]] = mul nsw i8 [[START]], 9
1314 %start.shl.3 = shl nsw i8 %start, 3
1315 %c.1 = icmp slt i8 %start.shl.3, %high
1318 %start.mul.9 = mul nsw i8 %start, 9
1319 %t.1 = icmp slt i8 %start.mul.9, %high