X86: Make sure that we have SSE4.1 before we generate insertps nodes.

PR19721.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2014-05-12 13:12:08 +00:00
parent cdf5f98f6f
commit b31a977c9c
2 changed files with 11 additions and 1 deletions

View File

@ -5459,7 +5459,7 @@ static SDValue LowerBuildVectorv4x32(SDValue Op, unsigned NumElems,
SDValue V = FirstNonZero.getOperand(0);
MVT VVT = V.getSimpleValueType();
if (VVT != MVT::v4f32 && VVT != MVT::v4i32)
if (!Subtarget->hasSSE41() || (VVT != MVT::v4f32 && VVT != MVT::v4i32))
return SDValue();
unsigned FirstNonZeroDst =

View File

@ -229,3 +229,13 @@ define <2 x i64> @test_insert_64_zext(<2 x i64> %i) {
%1 = shufflevector <2 x i64> %i, <2 x i64> <i64 0, i64 undef>, <2 x i32> <i32 0, i32 2>
ret <2 x i64> %1
}
define <4 x i32> @PR19721(<4 x i32> %i) {
%bc = bitcast <4 x i32> %i to i128
%insert = and i128 %bc, -4294967296
%bc2 = bitcast i128 %insert to <4 x i32>
ret <4 x i32> %bc2
; CHECK-LABEL: PR19721
; CHECK: punpckldq
}