fix a missing shuffle pattern, PR9009. Patch by Artiom Myaskouvskey!
authorChris Lattner <sabre@nondot.org>
Mon, 24 Jan 2011 03:42:46 +0000 (03:42 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 24 Jan 2011 03:42:46 +0000 (03:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124102 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/sse2.ll

index e9bfbeb0b6319e7923f08927048ef7d7cf64dda0..77f733626fa63cf174b68b3db186f6cca8f801a1 100644 (file)
@@ -5799,6 +5799,9 @@ def : Pat<(X86Movlps VR128:$src1,
 def : Pat<(v4f32 (X86Movlps VR128:$src1, VR128:$src2)),
           (MOVSDrr VR128:$src1, (EXTRACT_SUBREG (v4f32 VR128:$src2), sub_sd))>;
 
+def : Pat<(v4i32 (X86Movlps VR128:$src1, VR128:$src2)), 
+          (MOVSDrr VR128:$src1, (EXTRACT_SUBREG (v4i32 VR128:$src2), sub_sd))>; 
+
 // Shuffle with MOVLPD
 def : Pat<(v2f64 (X86Movlpd VR128:$src1, (load addr:$src2))),
           (MOVLPDrm VR128:$src1, addr:$src2)>;
index a9d718d2df018f3de96df64d63984cd7ee757b45..8fcfdff2896f664891ec1b0801d3b72be482b1bf 100644 (file)
@@ -205,3 +205,12 @@ define  <2 x double> @test16(<4 x double> * nocapture %srcA, <2 x double>* nocap
   ret <2 x double> %i7
 }
 
+; PR9009
+define fastcc void @test17() nounwind {
+entry:
+  %0 = insertelement <4 x i32> undef, i32 undef, i32 1
+  %1 = shufflevector <4 x i32> <i32 undef, i32 undef, i32 32768, i32 32768>, <4 x i32> %0, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
+  %2 = bitcast <4 x i32> %1 to <4 x float>
+  store <4 x float> %2, <4 x float> * undef
+  ret void
+}