summaryrefslogtreecommitdiff
path: root/test/Transforms/InstSimplify
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-02-10 14:26:42 +0000
committerDuncan Sands <baldrick@free.fr>2012-02-10 14:26:42 +0000
commitedfb931edbf31f8de132834e064ede723ac74d23 (patch)
treea9206df8ac8b7c0f33ea54ab146ed6a4841f2548 /test/Transforms/InstSimplify
parentc667ba69ac342563c0886e20509e68705d78a0a5 (diff)
downloadllvm-edfb931edbf31f8de132834e064ede723ac74d23.tar.gz
llvm-edfb931edbf31f8de132834e064ede723ac74d23.tar.bz2
llvm-edfb931edbf31f8de132834e064ede723ac74d23.tar.xz
Revert commit 149912 (lattner) and add a testcase that shows the problem (which
is that patterns no longer match for vectors of booleans, because you only get ConstantDataVector when the vector element type is i8, i16, etc, not when it is i1). Original commit message: Remove some dead code and tidy things up now that vectors use ConstantDataVector instead of always using ConstantVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstSimplify')
-rw-r--r--test/Transforms/InstSimplify/compare.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/compare.ll b/test/Transforms/InstSimplify/compare.ll
index 9f3dffe603..1ca23554ae 100644
--- a/test/Transforms/InstSimplify/compare.ll
+++ b/test/Transforms/InstSimplify/compare.ll
@@ -406,3 +406,12 @@ define i1 @mul3(i32 %X, i32 %Y) {
ret i1 %C
; CHECK: ret i1 true
}
+
+define <2 x i1> @vectorselect1(<2 x i1> %cond) {
+; CHECK: @vectorselect1
+ %invert = xor <2 x i1> %cond, <i1 1, i1 1>
+ %s = select <2 x i1> %invert, <2 x i32> <i32 0, i32 0>, <2 x i32> <i32 1, i32 1>
+ %c = icmp ne <2 x i32> %s, <i32 0, i32 0>
+ ret <2 x i1> %c
+; CHECK: ret <2 x i1> %cond
+}