mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Fix for PR2472. Use movss to set lower 32-bits of a zero XMM vector.
llvm-svn: 53386
This commit is contained in:
parent
5e57a12a80
commit
02a618dc56
@ -2870,6 +2870,8 @@ def : Pat<(v4f32 (X86vzmovl (v4f32 (scalar_to_vector FR32:$src)))),
|
||||
(MOVLSS2PSrr (V_SET0), FR32:$src)>, Requires<[HasSSE2]>;
|
||||
def : Pat<(v4f32 (X86vzmovl (v4f32 VR128:$src))),
|
||||
(MOVLPSrr (V_SET0), VR128:$src)>, Requires<[HasSSE2]>;
|
||||
def : Pat<(v4i32 (X86vzmovl (v4i32 VR128:$src))),
|
||||
(MOVLPSrr (V_SET0), VR128:$src)>, Requires<[HasSSE2]>;
|
||||
}
|
||||
|
||||
// Splat v2f64 / v2i64
|
||||
|
10
test/CodeGen/X86/vec_set-J.ll
Normal file
10
test/CodeGen/X86/vec_set-J.ll
Normal file
@ -0,0 +1,10 @@
|
||||
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss
|
||||
; PR2472
|
||||
|
||||
define <4 x i32> @a(<4 x i32> %a) nounwind {
|
||||
entry:
|
||||
%vecext = extractelement <4 x i32> %a, i32 0
|
||||
insertelement <4 x i32> zeroinitializer, i32 %vecext, i32 0
|
||||
%add = add <4 x i32> %a, %0
|
||||
ret <4 x i32> %add
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user