diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-08-16 23:18:42 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-08-16 23:18:42 +0000 |
| commit | 7ad324b3965699cd52fb4b133f3ab7eb39c656e5 (patch) | |
| tree | 89198161026fe4fb9a0654bb094bfc8040388a9a /llvm/test | |
| parent | 07d61425e396d4d0a2d4d75c48ce881634c6a513 (diff) | |
| download | bcm5719-llvm-7ad324b3965699cd52fb4b133f3ab7eb39c656e5.tar.gz bcm5719-llvm-7ad324b3965699cd52fb4b133f3ab7eb39c656e5.zip | |
[InstCombine] add tests for fold with no coverage and missing vector fold
llvm-svn: 278867
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/2008-01-29-AddICmp.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/2008-01-29-AddICmp.ll b/llvm/test/Transforms/InstCombine/2008-01-29-AddICmp.ll index 0f0b5c3f968..9aa65557476 100644 --- a/llvm/test/Transforms/InstCombine/2008-01-29-AddICmp.ll +++ b/llvm/test/Transforms/InstCombine/2008-01-29-AddICmp.ll @@ -67,3 +67,24 @@ define <2 x i1> @test3vec(<2 x i32> %a) { ret <2 x i1> %c } +define i1 @test4(i32 %a) { +; CHECK-LABEL: @test4( +; CHECK-NEXT: [[C:%.*]] = icmp slt i32 %a, -4 +; CHECK-NEXT: ret i1 [[C]] +; + %b = add i32 %a, 2147483652 + %c = icmp sge i32 %b, 4 + ret i1 %c +} + +define <2 x i1> @test4vec(<2 x i32> %a) { +; CHECK-LABEL: @test4vec( +; CHECK-NEXT: [[B:%.*]] = add <2 x i32> %a, <i32 -2147483644, i32 -2147483644> +; CHECK-NEXT: [[C:%.*]] = icmp sgt <2 x i32> [[B]], <i32 3, i32 3> +; CHECK-NEXT: ret <2 x i1> [[C]] +; + %b = add <2 x i32> %a, <i32 2147483652, i32 2147483652> + %c = icmp sge <2 x i32> %b, <i32 4, i32 4> + ret <2 x i1> %c +} + |

