1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll
Eli Friedman 08991c716a 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
2009-07-09 22:01:03 +00:00

12 lines
339 B
LLVM

; 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
}