diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-08-04 20:05:02 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-08-04 20:05:02 +0000 |
commit | d938e88e89bc01fd2ec73163159795cd86bdde10 (patch) | |
tree | 44b2ae53d839572e20b3fb4bba9756500ae266f0 /llvm/test/Transforms/InstCombine/and.ll | |
parent | d62d116add5c9aa8427e810594508b3d8f4b6260 (diff) | |
download | bcm5719-llvm-d938e88e89bc01fd2ec73163159795cd86bdde10.tar.gz bcm5719-llvm-d938e88e89bc01fd2ec73163159795cd86bdde10.zip |
[InstCombine] use m_APInt to allow icmp eq (and X, C1), C2 folds for splat constant vectors
llvm-svn: 277762
Diffstat (limited to 'llvm/test/Transforms/InstCombine/and.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/and.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstCombine/and.ll b/llvm/test/Transforms/InstCombine/and.ll index 9a6ae74cc7e..5b48f330495 100644 --- a/llvm/test/Transforms/InstCombine/and.ll +++ b/llvm/test/Transforms/InstCombine/and.ll @@ -196,11 +196,9 @@ define i1 @test18(i32 %A) { ret i1 %C } -; FIXME: Vectors should fold the same way. define <2 x i1> @test18_vec(<2 x i32> %A) { ; CHECK-LABEL: @test18_vec( -; CHECK-NEXT: [[B:%.*]] = and <2 x i32> %A, <i32 -128, i32 -128> -; CHECK-NEXT: [[C:%.*]] = icmp ne <2 x i32> [[B]], zeroinitializer +; CHECK-NEXT: [[C:%.*]] = icmp ugt <2 x i32> %A, <i32 127, i32 127> ; CHECK-NEXT: ret <2 x i1> [[C]] ; %B = and <2 x i32> %A, <i32 -128, i32 -128> @@ -218,11 +216,9 @@ define i1 @test18a(i8 %A) { ret i1 %C } -; FIXME: Vectors should fold the same way. define <2 x i1> @test18a_vec(<2 x i8> %A) { ; CHECK-LABEL: @test18a_vec( -; CHECK-NEXT: [[B:%.*]] = and <2 x i8> %A, <i8 -2, i8 -2> -; CHECK-NEXT: [[C:%.*]] = icmp eq <2 x i8> [[B]], zeroinitializer +; CHECK-NEXT: [[C:%.*]] = icmp ult <2 x i8> %A, <i8 2, i8 2> ; CHECK-NEXT: ret <2 x i1> [[C]] ; %B = and <2 x i8> %A, <i8 -2, i8 -2> |