summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-07-09 22:01:03 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-07-09 22:01:03 +0000
commit2b77eef1609d907c0d617f375087b27af9abd152 (patch)
tree68b29c9a635468a874dfd317d9bda9b85edb2beb /llvm/test/CodeGen
parentcf1441ab206747986158c9d0eb1496442c6c9292 (diff)
downloadbcm5719-llvm-2b77eef1609d907c0d617f375087b27af9abd152.tar.gz
bcm5719-llvm-2b77eef1609d907c0d617f375087b27af9abd152.zip
Make EXTRACT_VECTOR_ELT a bit more flexible in terms of the returned
value. Adjust other code to deal with that correctly. Make DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT take advantage of this new flexibility to simplify the code and make it deal with unusual vectors (like <4 x i1>) correctly. Fixes PR3037. llvm-svn: 75176
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/2009-07-07-SplitICmp.ll8
-rw-r--r--llvm/test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll11
2 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/2009-07-07-SplitICmp.ll b/llvm/test/CodeGen/X86/2009-07-07-SplitICmp.ll
new file mode 100644
index 00000000000..9a7b52d1523
--- /dev/null
+++ b/llvm/test/CodeGen/X86/2009-07-07-SplitICmp.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | llc -march=x86 -disable-mmx
+
+define void @test2(<2 x i32> %A, <2 x i32> %B, <2 x i32>* %C) nounwind {
+ %D = icmp sgt <2 x i32> %A, %B
+ %E = zext <2 x i1> %D to <2 x i32>
+ store <2 x i32> %E, <2 x i32>* %C
+ ret void
+}
diff --git a/llvm/test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll b/llvm/test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll
new file mode 100644
index 00000000000..62a62a69e37
--- /dev/null
+++ b/llvm/test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | llc -march=x86
+; PR3037
+
+define void @entry(<4 x i8>* %dest) {
+ %1 = xor <4 x i1> zeroinitializer, < i1 true, i1 true, i1 true, i1 true >
+ %2 = extractelement <4 x i1> %1, i32 3
+ %3 = zext i1 %2 to i8
+ %4 = insertelement <4 x i8> zeroinitializer, i8 %3, i32 3
+ store <4 x i8> %4, <4 x i8>* %dest, align 1
+ ret void
+}
OpenPOWER on IntegriCloud