[llvm-commits] [llvm] r50922 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_set-G.ll
Evan Cheng
evan.cheng at apple.com
Fri May 9 16:37:55 PDT 2008
Author: evancheng
Date: Fri May 9 18:37:55 2008
New Revision: 50922
URL: http://llvm.org/viewvc/llvm-project?rev=50922&view=rev
Log:
Add a pattern to do move the low element of a v4f32 and zero extend the rest.
Added:
llvm/trunk/test/CodeGen/X86/vec_set-G.ll
Modified:
llvm/trunk/lib/Target/X86/X86InstrSSE.td
Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=50922&r1=50921&r2=50922&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 9 18:37:55 2008
@@ -2768,6 +2768,8 @@
(MOVLSD2PDrr (V_SET0), FR64:$src)>, Requires<[HasSSE2]>;
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]>;
}
// Splat v2f64 / v2i64
Added: llvm/trunk/test/CodeGen/X86/vec_set-G.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_set-G.ll?rev=50922&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_set-G.ll (added)
+++ llvm/trunk/test/CodeGen/X86/vec_set-G.ll Fri May 9 18:37:55 2008
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss
+
+define fastcc void @t(<4 x float> %A) nounwind {
+ %tmp41896 = extractelement <4 x float> %A, i32 0 ; <float> [#uses=1]
+ %tmp14082 = insertelement <4 x float> < float 0.000000e+00, float undef, float undef, float undef >, float %tmp41896, i32 1 ; <<4 x float>> [#uses=1]
+ %tmp14083 = insertelement <4 x float> %tmp14082, float 0.000000e+00, i32 2 ; <<4 x float>> [#uses=1]
+ store <4 x float> %tmp14083, <4 x float>* null, align 16
+ ret void
+}
More information about the llvm-commits
mailing list