-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Regenerate test checks (NFC)
- Loading branch information
Showing
11 changed files
with
242 additions
and
121 deletions.
There are no files selected for viewing
45 changes: 29 additions & 16 deletions
45
llvm/test/Transforms/InstCombine/2006-12-15-Range-Test.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,44 @@ | ||
; RUN: opt < %s -instcombine -S | \ | ||
; RUN: grep icmp | count 1 | ||
; RUN: opt < %s -instcombine -S | \ | ||
; RUN: grep "icmp ugt" | count 1 | ||
; END. | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
|
||
target datalayout = "e-p:32:32" | ||
target triple = "i686-pc-linux-gnu" | ||
@r = external global [17 x i32] ; <[17 x i32]*> [#uses=1] | ||
|
||
define i1 @print_pgm_cond_true(i32 %tmp12.reload, i32* %tmp16.out) { | ||
; CHECK-LABEL: @print_pgm_cond_true( | ||
; CHECK-NEXT: newFuncRoot: | ||
; CHECK-NEXT: br label [[COND_TRUE:%.*]] | ||
; CHECK: bb27.exitStub: | ||
; CHECK-NEXT: store i32 [[TMP16:%.*]], i32* [[TMP16_OUT:%.*]], align 4 | ||
; CHECK-NEXT: ret i1 true | ||
; CHECK: cond_next23.exitStub: | ||
; CHECK-NEXT: store i32 [[TMP16]], i32* [[TMP16_OUT]], align 4 | ||
; CHECK-NEXT: ret i1 false | ||
; CHECK: cond_true: | ||
; CHECK-NEXT: [[TMP15:%.*]] = getelementptr [17 x i32], [17 x i32]* @r, i32 0, i32 [[TMP12_RELOAD:%.*]] | ||
; CHECK-NEXT: [[TMP16]] = load i32, i32* [[TMP15]], align 4 | ||
; CHECK-NEXT: [[TMP16_OFF:%.*]] = add i32 [[TMP16]], 31 | ||
; CHECK-NEXT: [[TMP0:%.*]] = icmp ugt i32 [[TMP16_OFF]], 62 | ||
; CHECK-NEXT: br i1 [[TMP0]], label [[BB27_EXITSTUB:%.*]], label [[COND_NEXT23_EXITSTUB:%.*]] | ||
; | ||
newFuncRoot: | ||
br label %cond_true | ||
br label %cond_true | ||
|
||
bb27.exitStub: ; preds = %cond_true | ||
store i32 %tmp16, i32* %tmp16.out | ||
ret i1 true | ||
store i32 %tmp16, i32* %tmp16.out | ||
ret i1 true | ||
|
||
cond_next23.exitStub: ; preds = %cond_true | ||
store i32 %tmp16, i32* %tmp16.out | ||
ret i1 false | ||
store i32 %tmp16, i32* %tmp16.out | ||
ret i1 false | ||
|
||
cond_true: ; preds = %newFuncRoot | ||
%tmp15 = getelementptr [17 x i32], [17 x i32]* @r, i32 0, i32 %tmp12.reload ; <i32*> [#uses=1] | ||
%tmp16 = load i32, i32* %tmp15 ; <i32> [#uses=4] | ||
%tmp18 = icmp slt i32 %tmp16, -31 ; <i1> [#uses=1] | ||
%tmp21 = icmp sgt i32 %tmp16, 31 ; <i1> [#uses=1] | ||
%bothcond = or i1 %tmp18, %tmp21 ; <i1> [#uses=1] | ||
br i1 %bothcond, label %bb27.exitStub, label %cond_next23.exitStub | ||
%tmp15 = getelementptr [17 x i32], [17 x i32]* @r, i32 0, i32 %tmp12.reload ; <i32*> [#uses=1] | ||
%tmp16 = load i32, i32* %tmp15 ; <i32> [#uses=4] | ||
%tmp18 = icmp slt i32 %tmp16, -31 ; <i1> [#uses=1] | ||
%tmp21 = icmp sgt i32 %tmp16, 31 ; <i1> [#uses=1] | ||
%bothcond = or i1 %tmp18, %tmp21 ; <i1> [#uses=1] | ||
br i1 %bothcond, label %bb27.exitStub, label %cond_next23.exitStub | ||
} | ||
|
16 changes: 11 additions & 5 deletions
16
llvm/test/Transforms/InstCombine/2007-03-13-CompareMerge.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
; RUN: opt < %s -instcombine -S | grep "icmp sle" | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
|
||
; PR1244 | ||
|
||
define i1 @test(i32 %c.3.i, i32 %d.292.2.i) { | ||
%tmp266.i = icmp slt i32 %c.3.i, %d.292.2.i | ||
%tmp276.i = icmp eq i32 %c.3.i, %d.292.2.i | ||
%sel_tmp80 = or i1 %tmp266.i, %tmp276.i | ||
ret i1 %sel_tmp80 | ||
; CHECK-LABEL: @test( | ||
; CHECK-NEXT: [[TMP1:%.*]] = icmp sle i32 [[C_3_I:%.*]], [[D_292_2_I:%.*]] | ||
; CHECK-NEXT: ret i1 [[TMP1]] | ||
; | ||
%tmp266.i = icmp slt i32 %c.3.i, %d.292.2.i | ||
%tmp276.i = icmp eq i32 %c.3.i, %d.292.2.i | ||
%sel_tmp80 = or i1 %tmp266.i, %tmp276.i | ||
ret i1 %sel_tmp80 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
; RUN: opt < %s -instcombine -disable-output | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
|
||
define i1 @test(i32 %tmp9) { | ||
%tmp20 = icmp ugt i32 %tmp9, 255 ; <i1> [#uses=1] | ||
%tmp11.not = icmp sgt i32 %tmp9, 255 ; <i1> [#uses=1] | ||
%bothcond = or i1 %tmp20, %tmp11.not ; <i1> [#uses=1] | ||
ret i1 %bothcond | ||
; CHECK-LABEL: @test( | ||
; CHECK-NEXT: [[TMP20:%.*]] = icmp ugt i32 [[TMP9:%.*]], 255 | ||
; CHECK-NEXT: ret i1 [[TMP20]] | ||
; | ||
%tmp20 = icmp ugt i32 %tmp9, 255 ; <i1> [#uses=1] | ||
%tmp11.not = icmp sgt i32 %tmp9, 255 ; <i1> [#uses=1] | ||
%bothcond = or i1 %tmp20, %tmp11.not ; <i1> [#uses=1] | ||
ret i1 %bothcond | ||
} | ||
|
16 changes: 11 additions & 5 deletions
16
llvm/test/Transforms/InstCombine/2007-11-15-CompareMiscomp.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
; RUN: opt < %s -instcombine -S | grep "icmp eq i32 %In, 1" | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
|
||
; PR1800 | ||
|
||
define i1 @test(i32 %In) { | ||
%c1 = icmp sgt i32 %In, -1 | ||
%c2 = icmp eq i32 %In, 1 | ||
%V = and i1 %c1, %c2 | ||
ret i1 %V | ||
; CHECK-LABEL: @test( | ||
; CHECK-NEXT: [[C2:%.*]] = icmp eq i32 [[IN:%.*]], 1 | ||
; CHECK-NEXT: ret i1 [[C2]] | ||
; | ||
%c1 = icmp sgt i32 %In, -1 | ||
%c2 = icmp eq i32 %In, 1 | ||
%V = and i1 %c1, %c2 | ||
ret i1 %V | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
; RUN: opt < %s -instcombine -S | grep and | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
|
||
; PR1907 | ||
|
||
define i1 @test(i32 %c84.17) { | ||
%tmp2696 = icmp ne i32 %c84.17, 34 ; <i1> [#uses=2] | ||
%tmp2699 = icmp sgt i32 %c84.17, -1 ; <i1> [#uses=1] | ||
%tmp2703 = and i1 %tmp2696, %tmp2699 ; <i1> [#uses=1] | ||
ret i1 %tmp2703 | ||
; CHECK-LABEL: @test( | ||
; CHECK-NEXT: [[TMP2696:%.*]] = icmp ne i32 [[C84_17:%.*]], 34 | ||
; CHECK-NEXT: [[TMP2699:%.*]] = icmp sgt i32 [[C84_17]], -1 | ||
; CHECK-NEXT: [[TMP2703:%.*]] = and i1 [[TMP2696]], [[TMP2699]] | ||
; CHECK-NEXT: ret i1 [[TMP2703]] | ||
; | ||
%tmp2696 = icmp ne i32 %c84.17, 34 ; <i1> [#uses=2] | ||
%tmp2699 = icmp sgt i32 %c84.17, -1 ; <i1> [#uses=1] | ||
%tmp2703 = and i1 %tmp2696, %tmp2699 ; <i1> [#uses=1] | ||
ret i1 %tmp2703 | ||
} |
27 changes: 20 additions & 7 deletions
27
llvm/test/Transforms/InstCombine/2008-02-28-OrFCmpCrash.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
; RUN: opt < %s -instcombine | llvm-dis | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
|
||
; rdar://5771353 | ||
|
||
define float @test(float %x, x86_fp80 %y) nounwind readonly { | ||
; CHECK-LABEL: @test( | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP67:%.*]] = fcmp uno x86_fp80 [[Y:%.*]], 0xK00000000000000000000 | ||
; CHECK-NEXT: [[TMP71:%.*]] = fcmp uno float [[X:%.*]], 0.000000e+00 | ||
; CHECK-NEXT: [[BOTHCOND:%.*]] = or i1 [[TMP67]], [[TMP71]] | ||
; CHECK-NEXT: br i1 [[BOTHCOND]], label [[BB74:%.*]], label [[BB80:%.*]] | ||
; CHECK: bb74: | ||
; CHECK-NEXT: ret float 0.000000e+00 | ||
; CHECK: bb80: | ||
; CHECK-NEXT: ret float 0.000000e+00 | ||
; | ||
entry: | ||
%tmp67 = fcmp uno x86_fp80 %y, 0xK00000000000000000000 ; <i1> [#uses=1] | ||
%tmp71 = fcmp uno float %x, 0.000000e+00 ; <i1> [#uses=1] | ||
%bothcond = or i1 %tmp67, %tmp71 ; <i1> [#uses=1] | ||
br i1 %bothcond, label %bb74, label %bb80 | ||
%tmp67 = fcmp uno x86_fp80 %y, 0xK00000000000000000000 ; <i1> [#uses=1] | ||
%tmp71 = fcmp uno float %x, 0.000000e+00 ; <i1> [#uses=1] | ||
%bothcond = or i1 %tmp67, %tmp71 ; <i1> [#uses=1] | ||
br i1 %bothcond, label %bb74, label %bb80 | ||
|
||
bb74: ; preds = %entry | ||
ret float 0.000000e+00 | ||
ret float 0.000000e+00 | ||
|
||
bb80: ; preds = %entry | ||
ret float 0.000000e+00 | ||
ret float 0.000000e+00 | ||
} |
16 changes: 11 additions & 5 deletions
16
llvm/test/Transforms/InstCombine/2008-06-21-CompareMiscomp.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
; RUN: opt < %s -instcombine -S | grep "icmp eq i32 %In, 15" | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
|
||
; PR2479 | ||
; (See also PR1800.) | ||
|
||
define i1 @test(i32 %In) { | ||
%c1 = icmp ugt i32 %In, 13 | ||
%c2 = icmp eq i32 %In, 15 | ||
%V = and i1 %c1, %c2 | ||
ret i1 %V | ||
; CHECK-LABEL: @test( | ||
; CHECK-NEXT: [[C2:%.*]] = icmp eq i32 [[IN:%.*]], 15 | ||
; CHECK-NEXT: ret i1 [[C2]] | ||
; | ||
%c1 = icmp ugt i32 %In, 13 | ||
%c2 = icmp eq i32 %In, 15 | ||
%V = and i1 %c1, %c2 | ||
ret i1 %V | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,40 @@ | ||
; RUN: opt < %s -instcombine -S | not grep or | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S | FileCheck %s | ||
; PR2629 | ||
|
||
define void @f(i8* %x) nounwind { | ||
; CHECK-LABEL: @f( | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: br label [[BB:%.*]] | ||
; CHECK: bb: | ||
; CHECK-NEXT: [[L1:%.*]] = load i8, i8* [[X:%.*]], align 1 | ||
; CHECK-NEXT: [[S1:%.*]] = add i8 [[L1]], -6 | ||
; CHECK-NEXT: [[C1:%.*]] = icmp ugt i8 [[S1]], 2 | ||
; CHECK-NEXT: [[S2:%.*]] = add i8 [[L1]], -10 | ||
; CHECK-NEXT: [[C2:%.*]] = icmp ugt i8 [[S2]], 2 | ||
; CHECK-NEXT: [[A1:%.*]] = and i1 [[C1]], [[C2]] | ||
; CHECK-NEXT: br i1 [[A1]], label [[INCOMPATIBLE:%.*]], label [[OKAY:%.*]] | ||
; CHECK: okay: | ||
; CHECK-NEXT: ret void | ||
; CHECK: incompatible: | ||
; CHECK-NEXT: ret void | ||
; | ||
entry: | ||
br label %bb | ||
br label %bb | ||
|
||
bb: | ||
%g1 = getelementptr i8, i8* %x, i32 0 | ||
%l1 = load i8, i8* %g1, align 1 | ||
%s1 = sub i8 %l1, 6 | ||
%c1 = icmp ugt i8 %s1, 2 | ||
%s2 = sub i8 %l1, 10 | ||
%c2 = icmp ugt i8 %s2, 2 | ||
%a1 = and i1 %c1, %c2 | ||
br i1 %a1, label %incompatible, label %okay | ||
%g1 = getelementptr i8, i8* %x, i32 0 | ||
%l1 = load i8, i8* %g1, align 1 | ||
%s1 = sub i8 %l1, 6 | ||
%c1 = icmp ugt i8 %s1, 2 | ||
%s2 = sub i8 %l1, 10 | ||
%c2 = icmp ugt i8 %s2, 2 | ||
%a1 = and i1 %c1, %c2 | ||
br i1 %a1, label %incompatible, label %okay | ||
|
||
okay: | ||
ret void | ||
ret void | ||
|
||
incompatible: | ||
ret void | ||
ret void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 22 additions & 5 deletions
27
llvm/test/Transforms/InstCombine/2012-03-10-InstCombine.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.