diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-07-09 22:01:03 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-07-09 22:01:03 +0000 |
commit | c680ac90032bf455b2bba77de538fccea08eb267 (patch) | |
tree | 00f8af7d1bfa6165c868a13adc39b98f4f7dd522 /test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll | |
parent | 6dded67b0d6262964e22163d0ab37c9ee6957c0a (diff) | |
download | llvm-c680ac90032bf455b2bba77de538fccea08eb267.tar.gz llvm-c680ac90032bf455b2bba77de538fccea08eb267.tar.bz2 llvm-c680ac90032bf455b2bba77de538fccea08eb267.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll')
-rw-r--r-- | test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll b/test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll new file mode 100644 index 0000000000..62a62a69e3 --- /dev/null +++ b/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 +} |