diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-08-04 17:48:04 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-08-04 17:48:04 +0000 |
commit | bcaf6f39dd28ee563afb2719cd001d506de7ca2d (patch) | |
tree | 8db9bcb7084b56a94c357bb5a5c9626d50a16ecd /llvm/test/Transforms | |
parent | 3dbce52c16959942229875b3b070c42a6ea7e56e (diff) | |
download | bcm5719-llvm-bcaf6f39dd28ee563afb2719cd001d506de7ca2d.tar.gz bcm5719-llvm-bcaf6f39dd28ee563afb2719cd001d506de7ca2d.zip |
[InstCombine] use m_APInt to allow icmp eq (op X, Y), C folds for splat constant vectors
I'm removing a misplaced pair of more specific folds from InstCombine in this patch as well,
so we know where those folds are happening in InstSimplify.
llvm-svn: 277738
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/InstSimplify/compare.ll | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll index 4d302036d88..ece58483c6d 100644 --- a/llvm/test/Transforms/InstSimplify/compare.ll +++ b/llvm/test/Transforms/InstSimplify/compare.ll @@ -1,3 +1,4 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -instsimplify -S | FileCheck %s target datalayout = "p:32:32" @@ -1017,9 +1018,7 @@ define i1 @icmp_eq_const(i32 %a) { ; FIXME: Vectors should fold the same way. define <2 x i1> @icmp_eq_const_vec(<2 x i32> %a) { ; CHECK-LABEL: @icmp_eq_const_vec( -; CHECK-NEXT: [[B:%.*]] = mul nsw <2 x i32> %a, <i32 -2, i32 -2> -; CHECK-NEXT: [[C:%.*]] = icmp eq <2 x i32> [[B]], <i32 1, i32 1> -; CHECK-NEXT: ret <2 x i1> [[C]] +; CHECK-NEXT: ret <2 x i1> zeroinitializer ; %b = mul nsw <2 x i32> %a, <i32 -2, i32 -2> %c = icmp eq <2 x i32> %b, <i32 1, i32 1> @@ -1038,9 +1037,7 @@ define i1 @icmp_ne_const(i32 %a) { ; FIXME: Vectors should fold the same way. define <2 x i1> @icmp_ne_const_vec(<2 x i32> %a) { ; CHECK-LABEL: @icmp_ne_const_vec( -; CHECK-NEXT: [[B:%.*]] = mul nsw <2 x i32> %a, <i32 -2, i32 -2> -; CHECK-NEXT: [[C:%.*]] = icmp ne <2 x i32> [[B]], <i32 1, i32 1> -; CHECK-NEXT: ret <2 x i1> [[C]] +; CHECK-NEXT: ret <2 x i1> <i1 true, i1 true> ; %b = mul nsw <2 x i32> %a, <i32 -2, i32 -2> %c = icmp ne <2 x i32> %b, <i32 1, i32 1> |