summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-08-18 15:44:44 +0000
committerSanjay Patel <spatel@rotateright.com>2016-08-18 15:44:44 +0000
commit6347807f87c9f153b0bc48b653cb2078dc76a24f (patch)
tree3009a792dc5d79026245d2a7cd2df435881dc745 /llvm/test
parentd80912871d9a96fa06b904ee73113defe3ff8689 (diff)
downloadbcm5719-llvm-6347807f87c9f153b0bc48b653cb2078dc76a24f.tar.gz
bcm5719-llvm-6347807f87c9f153b0bc48b653cb2078dc76a24f.zip
[InstCombine] use m_APInt to allow icmp (mul X, Y), C folds for splat constant vectors
This is a sibling of: https://reviews.llvm.org/rL278859 https://reviews.llvm.org/rL278935 https://reviews.llvm.org/rL278945 https://reviews.llvm.org/rL279066 llvm-svn: 279077
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/icmp.ll4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/test/Transforms/InstCombine/icmp.ll b/llvm/test/Transforms/InstCombine/icmp.ll
index 0dbd386adf0..b1f5e501f02 100644
--- a/llvm/test/Transforms/InstCombine/icmp.ll
+++ b/llvm/test/Transforms/InstCombine/icmp.ll
@@ -1305,11 +1305,9 @@ define i1 @icmp_mul_nsw_neg1(i32 %x) {
ret i1 %cmp
}
-; FIXME: Vectors should fold the same way.
define <2 x i1> @icmp_mul_nsw_neg1_vec(<2 x i32> %x) {
; CHECK-LABEL: @icmp_mul_nsw_neg1_vec(
-; CHECK-NEXT: [[MUL:%.*]] = mul nsw <2 x i32> %x, <i32 -12, i32 -12>
-; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <2 x i32> [[MUL]], zeroinitializer
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt <2 x i32> %x, zeroinitializer
; CHECK-NEXT: ret <2 x i1> [[CMP]]
;
%mul = mul nsw <2 x i32> %x, <i32 -12, i32 -12>
OpenPOWER on IntegriCloud