@@ -280,30 +280,20 @@ next:
280
280
281
281
define i1 @arg_attribute (i8* nonnull %a ) {
282
282
; CHECK-LABEL: @arg_attribute(
283
- ; CHECK-NEXT: br label [[EXIT:%.*]]
284
- ; CHECK: exit:
285
283
; CHECK-NEXT: ret i1 false
286
284
;
287
285
%cmp = icmp eq i8* %a , null
288
- br label %exit
289
-
290
- exit:
291
286
ret i1 %cmp
292
287
}
293
288
294
289
declare nonnull i8* @return_nonnull ()
295
290
define i1 @call_attribute () {
296
291
; CHECK-LABEL: @call_attribute(
297
292
; CHECK-NEXT: [[A:%.*]] = call i8* @return_nonnull()
298
- ; CHECK-NEXT: br label [[EXIT:%.*]]
299
- ; CHECK: exit:
300
293
; CHECK-NEXT: ret i1 false
301
294
;
302
295
%a = call i8* @return_nonnull ()
303
296
%cmp = icmp eq i8* %a , null
304
- br label %exit
305
-
306
- exit:
307
297
ret i1 %cmp
308
298
}
309
299
@@ -318,8 +308,6 @@ define i1 @umin(i32 %a, i32 %b) {
318
308
; CHECK: b_guard:
319
309
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp ult i32 [[A]], [[B]]
320
310
; CHECK-NEXT: [[MIN:%.*]] = select i1 [[SEL_CMP]], i32 [[A]], i32 [[B]]
321
- ; CHECK-NEXT: br label [[NEXT:%.*]]
322
- ; CHECK: next:
323
311
; CHECK-NEXT: ret i1 false
324
312
; CHECK: out:
325
313
; CHECK-NEXT: ret i1 false
@@ -336,8 +324,6 @@ b_guard:
336
324
%sel_cmp = icmp ult i32 %a , %b
337
325
%min = select i1 %sel_cmp , i32 %a , i32 %b
338
326
%res = icmp eq i32 %min , 7
339
- br label %next
340
- next:
341
327
ret i1 %res
342
328
out:
343
329
ret i1 false
@@ -354,8 +340,6 @@ define i1 @smin(i32 %a, i32 %b) {
354
340
; CHECK: b_guard:
355
341
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp sle i32 [[A]], [[B]]
356
342
; CHECK-NEXT: [[MIN:%.*]] = select i1 [[SEL_CMP]], i32 [[A]], i32 [[B]]
357
- ; CHECK-NEXT: br label [[NEXT:%.*]]
358
- ; CHECK: next:
359
343
; CHECK-NEXT: ret i1 false
360
344
; CHECK: out:
361
345
; CHECK-NEXT: ret i1 false
@@ -372,8 +356,6 @@ b_guard:
372
356
%sel_cmp = icmp sle i32 %a , %b
373
357
%min = select i1 %sel_cmp , i32 %a , i32 %b
374
358
%res = icmp eq i32 %min , 7
375
- br label %next
376
- next:
377
359
ret i1 %res
378
360
out:
379
361
ret i1 false
@@ -390,8 +372,6 @@ define i1 @smax(i32 %a, i32 %b) {
390
372
; CHECK: b_guard:
391
373
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp sge i32 [[A]], [[B]]
392
374
; CHECK-NEXT: [[MAX:%.*]] = select i1 [[SEL_CMP]], i32 [[A]], i32 [[B]]
393
- ; CHECK-NEXT: br label [[NEXT:%.*]]
394
- ; CHECK: next:
395
375
; CHECK-NEXT: ret i1 false
396
376
; CHECK: out:
397
377
; CHECK-NEXT: ret i1 false
@@ -408,8 +388,6 @@ b_guard:
408
388
%sel_cmp = icmp sge i32 %a , %b
409
389
%max = select i1 %sel_cmp , i32 %a , i32 %b
410
390
%res = icmp eq i32 %max , 7
411
- br label %next
412
- next:
413
391
ret i1 %res
414
392
out:
415
393
ret i1 false
@@ -426,8 +404,6 @@ define i1 @umax(i32 %a, i32 %b) {
426
404
; CHECK: b_guard:
427
405
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp uge i32 [[A]], [[B]]
428
406
; CHECK-NEXT: [[MAX:%.*]] = select i1 [[SEL_CMP]], i32 [[A]], i32 [[B]]
429
- ; CHECK-NEXT: br label [[NEXT:%.*]]
430
- ; CHECK: next:
431
407
; CHECK-NEXT: ret i1 false
432
408
; CHECK: out:
433
409
; CHECK-NEXT: ret i1 false
@@ -444,8 +420,6 @@ b_guard:
444
420
%sel_cmp = icmp uge i32 %a , %b
445
421
%max = select i1 %sel_cmp , i32 %a , i32 %b
446
422
%res = icmp eq i32 %max , 7
447
- br label %next
448
- next:
449
423
ret i1 %res
450
424
out:
451
425
ret i1 false
@@ -460,8 +434,6 @@ define i1 @clamp_low1(i32 %a) {
460
434
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp eq i32 [[A]], 5
461
435
; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[A]], -1
462
436
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[SEL_CMP]], i32 5, i32 [[A]]
463
- ; CHECK-NEXT: br label [[NEXT:%.*]]
464
- ; CHECK: next:
465
437
; CHECK-NEXT: ret i1 false
466
438
; CHECK: out:
467
439
; CHECK-NEXT: ret i1 false
@@ -475,8 +447,6 @@ a_guard:
475
447
%add = add i32 %a , -1
476
448
%sel = select i1 %sel_cmp , i32 5 , i32 %a
477
449
%res = icmp eq i32 %sel , 4
478
- br label %next
479
- next:
480
450
ret i1 %res
481
451
out:
482
452
ret i1 false
@@ -491,8 +461,6 @@ define i1 @clamp_low2(i32 %a) {
491
461
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp ne i32 [[A]], 5
492
462
; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[A]], -1
493
463
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[SEL_CMP]], i32 [[A]], i32 5
494
- ; CHECK-NEXT: br label [[NEXT:%.*]]
495
- ; CHECK: next:
496
464
; CHECK-NEXT: ret i1 false
497
465
; CHECK: out:
498
466
; CHECK-NEXT: ret i1 false
@@ -506,8 +474,6 @@ a_guard:
506
474
%add = add i32 %a , -1
507
475
%sel = select i1 %sel_cmp , i32 %a , i32 5
508
476
%res = icmp eq i32 %sel , 4
509
- br label %next
510
- next:
511
477
ret i1 %res
512
478
out:
513
479
ret i1 false
@@ -522,8 +488,6 @@ define i1 @clamp_high1(i32 %a) {
522
488
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp eq i32 [[A]], 5
523
489
; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[A]], 1
524
490
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[SEL_CMP]], i32 5, i32 [[A]]
525
- ; CHECK-NEXT: br label [[NEXT:%.*]]
526
- ; CHECK: next:
527
491
; CHECK-NEXT: ret i1 false
528
492
; CHECK: out:
529
493
; CHECK-NEXT: ret i1 false
@@ -537,8 +501,6 @@ a_guard:
537
501
%add = add i32 %a , 1
538
502
%sel = select i1 %sel_cmp , i32 5 , i32 %a
539
503
%res = icmp eq i32 %sel , 6
540
- br label %next
541
- next:
542
504
ret i1 %res
543
505
out:
544
506
ret i1 false
@@ -553,8 +515,6 @@ define i1 @clamp_high2(i32 %a) {
553
515
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp ne i32 [[A]], 5
554
516
; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[A]], 1
555
517
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[SEL_CMP]], i32 [[A]], i32 5
556
- ; CHECK-NEXT: br label [[NEXT:%.*]]
557
- ; CHECK: next:
558
518
; CHECK-NEXT: ret i1 false
559
519
; CHECK: out:
560
520
; CHECK-NEXT: ret i1 false
@@ -568,8 +528,6 @@ a_guard:
568
528
%add = add i32 %a , 1
569
529
%sel = select i1 %sel_cmp , i32 %a , i32 5
570
530
%res = icmp eq i32 %sel , 6
571
- br label %next
572
- next:
573
531
ret i1 %res
574
532
out:
575
533
ret i1 false
@@ -585,8 +543,6 @@ define i1 @clamp_high3(i32 %a) {
585
543
; CHECK-NEXT: [[SEL_CMP:%.*]] = icmp ne i32 [[A]], 5
586
544
; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[A]], 100
587
545
; CHECK-NEXT: [[SEL:%.*]] = select i1 [[SEL_CMP]], i32 [[A]], i32 5
588
- ; CHECK-NEXT: br label [[NEXT:%.*]]
589
- ; CHECK: next:
590
546
; CHECK-NEXT: ret i1 false
591
547
; CHECK: out:
592
548
; CHECK-NEXT: ret i1 false
@@ -600,8 +556,6 @@ a_guard:
600
556
%add = add i32 %a , 100
601
557
%sel = select i1 %sel_cmp , i32 %a , i32 5
602
558
%res = icmp eq i32 %sel , 105
603
- br label %next
604
- next:
605
559
ret i1 %res
606
560
out:
607
561
ret i1 false
@@ -618,8 +572,6 @@ define void @abs1(i32 %a, i1* %p) {
618
572
; CHECK-NEXT: [[SUB:%.*]] = sub nsw i32 0, [[A]]
619
573
; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[A]], 0
620
574
; CHECK-NEXT: [[ABS:%.*]] = select i1 [[CMP]], i32 [[SUB]], i32 [[A]]
621
- ; CHECK-NEXT: br label [[SPLIT:%.*]]
622
- ; CHECK: split:
623
575
; CHECK-NEXT: store i1 true, i1* [[P:%.*]], align 1
624
576
; CHECK-NEXT: [[C2:%.*]] = icmp slt i32 [[ABS]], 19
625
577
; CHECK-NEXT: store i1 [[C2]], i1* [[P]], align 1
@@ -640,9 +592,6 @@ guard:
640
592
%sub = sub i32 0 , %a
641
593
%cmp = icmp slt i32 %a , 0
642
594
%abs = select i1 %cmp , i32 %sub , i32 %a
643
- br label %split
644
-
645
- split:
646
595
%c1 = icmp slt i32 %abs , 20
647
596
store i1 %c1 , i1* %p
648
597
%c2 = icmp slt i32 %abs , 19
@@ -668,8 +617,6 @@ define void @abs2(i32 %a, i1* %p) {
668
617
; CHECK-NEXT: [[SUB:%.*]] = sub nsw i32 0, [[A]]
669
618
; CHECK-NEXT: [[CMP:%.*]] = icmp sge i32 [[A]], 0
670
619
; CHECK-NEXT: [[ABS:%.*]] = select i1 [[CMP]], i32 [[A]], i32 [[SUB]]
671
- ; CHECK-NEXT: br label [[SPLIT:%.*]]
672
- ; CHECK: split:
673
620
; CHECK-NEXT: store i1 true, i1* [[P:%.*]], align 1
674
621
; CHECK-NEXT: [[C2:%.*]] = icmp slt i32 [[ABS]], 19
675
622
; CHECK-NEXT: store i1 [[C2]], i1* [[P]], align 1
@@ -690,9 +637,6 @@ guard:
690
637
%sub = sub i32 0 , %a
691
638
%cmp = icmp sge i32 %a , 0
692
639
%abs = select i1 %cmp , i32 %a , i32 %sub
693
- br label %split
694
-
695
- split:
696
640
%c1 = icmp slt i32 %abs , 20
697
641
store i1 %c1 , i1* %p
698
642
%c2 = icmp slt i32 %abs , 19
@@ -718,8 +662,6 @@ define void @nabs1(i32 %a, i1* %p) {
718
662
; CHECK-NEXT: [[SUB:%.*]] = sub nsw i32 0, [[A]]
719
663
; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[A]], 0
720
664
; CHECK-NEXT: [[NABS:%.*]] = select i1 [[CMP]], i32 [[SUB]], i32 [[A]]
721
- ; CHECK-NEXT: br label [[SPLIT:%.*]]
722
- ; CHECK: split:
723
665
; CHECK-NEXT: store i1 true, i1* [[P:%.*]], align 1
724
666
; CHECK-NEXT: [[C2:%.*]] = icmp sgt i32 [[NABS]], -19
725
667
; CHECK-NEXT: store i1 [[C2]], i1* [[P]], align 1
@@ -740,9 +682,6 @@ guard:
740
682
%sub = sub i32 0 , %a
741
683
%cmp = icmp sgt i32 %a , 0
742
684
%nabs = select i1 %cmp , i32 %sub , i32 %a
743
- br label %split
744
-
745
- split:
746
685
%c1 = icmp sgt i32 %nabs , -20
747
686
store i1 %c1 , i1* %p
748
687
%c2 = icmp sgt i32 %nabs , -19
@@ -768,8 +707,6 @@ define void @nabs2(i32 %a, i1* %p) {
768
707
; CHECK-NEXT: [[SUB:%.*]] = sub nsw i32 0, [[A]]
769
708
; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[A]], 0
770
709
; CHECK-NEXT: [[NABS:%.*]] = select i1 [[CMP]], i32 [[A]], i32 [[SUB]]
771
- ; CHECK-NEXT: br label [[SPLIT:%.*]]
772
- ; CHECK: split:
773
710
; CHECK-NEXT: store i1 true, i1* [[P:%.*]], align 1
774
711
; CHECK-NEXT: [[C2:%.*]] = icmp sgt i32 [[NABS]], -19
775
712
; CHECK-NEXT: store i1 [[C2]], i1* [[P]], align 1
@@ -790,9 +727,6 @@ guard:
790
727
%sub = sub i32 0 , %a
791
728
%cmp = icmp slt i32 %a , 0
792
729
%nabs = select i1 %cmp , i32 %a , i32 %sub
793
- br label %split
794
-
795
- split:
796
730
%c1 = icmp sgt i32 %nabs , -20
797
731
store i1 %c1 , i1* %p
798
732
%c2 = icmp sgt i32 %nabs , -19
@@ -811,15 +745,11 @@ define i1 @zext_unknown(i8 %a) {
811
745
; CHECK-LABEL: @zext_unknown(
812
746
; CHECK-NEXT: entry:
813
747
; CHECK-NEXT: [[A32:%.*]] = zext i8 [[A:%.*]] to i32
814
- ; CHECK-NEXT: br label [[EXIT:%.*]]
815
- ; CHECK: exit:
816
748
; CHECK-NEXT: ret i1 true
817
749
;
818
750
entry:
819
751
%a32 = zext i8 %a to i32
820
752
%cmp = icmp sle i32 %a32 , 256
821
- br label %exit
822
- exit:
823
753
ret i1 %cmp
824
754
}
825
755
@@ -828,16 +758,12 @@ define i1 @trunc_unknown(i32 %a) {
828
758
; CHECK-NEXT: entry:
829
759
; CHECK-NEXT: [[A8:%.*]] = trunc i32 [[A:%.*]] to i8
830
760
; CHECK-NEXT: [[A32:%.*]] = sext i8 [[A8]] to i32
831
- ; CHECK-NEXT: br label [[EXIT:%.*]]
832
- ; CHECK: exit:
833
761
; CHECK-NEXT: ret i1 true
834
762
;
835
763
entry:
836
764
%a8 = trunc i32 %a to i8
837
765
%a32 = sext i8 %a8 to i32
838
766
%cmp = icmp sle i32 %a32 , 128
839
- br label %exit
840
- exit:
841
767
ret i1 %cmp
842
768
}
843
769
@@ -848,15 +774,11 @@ define i1 @bitcast_unknown(float %a) {
848
774
; CHECK-NEXT: entry:
849
775
; CHECK-NEXT: [[A32:%.*]] = bitcast float [[A:%.*]] to i32
850
776
; CHECK-NEXT: [[CMP:%.*]] = icmp sle i32 [[A32]], 128
851
- ; CHECK-NEXT: br label [[EXIT:%.*]]
852
- ; CHECK: exit:
853
777
; CHECK-NEXT: ret i1 [[CMP]]
854
778
;
855
779
entry:
856
780
%a32 = bitcast float %a to i32
857
781
%cmp = icmp sle i32 %a32 , 128
858
- br label %exit
859
- exit:
860
782
ret i1 %cmp
861
783
}
862
784
@@ -865,15 +787,11 @@ define i1 @bitcast_unknown2(i8* %p) {
865
787
; CHECK-NEXT: entry:
866
788
; CHECK-NEXT: [[P64:%.*]] = ptrtoint i8* [[P:%.*]] to i64
867
789
; CHECK-NEXT: [[CMP:%.*]] = icmp sle i64 [[P64]], 128
868
- ; CHECK-NEXT: br label [[EXIT:%.*]]
869
- ; CHECK: exit:
870
790
; CHECK-NEXT: ret i1 [[CMP]]
871
791
;
872
792
entry:
873
793
%p64 = ptrtoint i8* %p to i64
874
794
%cmp = icmp sle i64 %p64 , 128
875
- br label %exit
876
- exit:
877
795
ret i1 %cmp
878
796
}
879
797
@@ -882,47 +800,35 @@ define i1 @and_unknown(i32 %a) {
882
800
; CHECK-LABEL: @and_unknown(
883
801
; CHECK-NEXT: entry:
884
802
; CHECK-NEXT: [[AND:%.*]] = and i32 [[A:%.*]], 128
885
- ; CHECK-NEXT: br label [[EXIT:%.*]]
886
- ; CHECK: exit:
887
803
; CHECK-NEXT: ret i1 true
888
804
;
889
805
entry:
890
806
%and = and i32 %a , 128
891
807
%cmp = icmp sle i32 %and , 128
892
- br label %exit
893
- exit:
894
808
ret i1 %cmp
895
809
}
896
810
897
811
define i1 @lshr_unknown (i32 %a ) {
898
812
; CHECK-LABEL: @lshr_unknown(
899
813
; CHECK-NEXT: entry:
900
814
; CHECK-NEXT: [[AND:%.*]] = lshr i32 [[A:%.*]], 30
901
- ; CHECK-NEXT: br label [[EXIT:%.*]]
902
- ; CHECK: exit:
903
815
; CHECK-NEXT: ret i1 true
904
816
;
905
817
entry:
906
818
%and = lshr i32 %a , 30
907
819
%cmp = icmp sle i32 %and , 128
908
- br label %exit
909
- exit:
910
820
ret i1 %cmp
911
821
}
912
822
913
823
define i1 @urem_unknown (i32 %a ) {
914
824
; CHECK-LABEL: @urem_unknown(
915
825
; CHECK-NEXT: entry:
916
826
; CHECK-NEXT: [[UREM:%.*]] = urem i32 [[A:%.*]], 30
917
- ; CHECK-NEXT: br label [[EXIT:%.*]]
918
- ; CHECK: exit:
919
827
; CHECK-NEXT: ret i1 true
920
828
;
921
829
entry:
922
830
%urem = urem i32 %a , 30
923
831
%cmp = icmp ult i32 %urem , 30
924
- br label %exit
925
- exit:
926
832
ret i1 %cmp
927
833
}
928
834
0 commit comments