[llvm] r208552 - X86: Make sure that we have SSE4.1 before we generate insertps nodes.
Benjamin Kramer
benny.kra at googlemail.com
Mon May 12 06:12:08 PDT 2014
Author: d0k
Date: Mon May 12 08:12:08 2014
New Revision: 208552
URL: http://llvm.org/viewvc/llvm-project?rev=208552&view=rev
Log:
X86: Make sure that we have SSE4.1 before we generate insertps nodes.
PR19721.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/sse2.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=208552&r1=208551&r2=208552&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon May 12 08:12:08 2014
@@ -5459,7 +5459,7 @@ static SDValue LowerBuildVectorv4x32(SDV
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 =
Modified: llvm/trunk/test/CodeGen/X86/sse2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse2.ll?rev=208552&r1=208551&r2=208552&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse2.ll Mon May 12 08:12:08 2014
@@ -229,3 +229,13 @@ define <2 x i64> @test_insert_64_zext(<2
%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
+}
More information about the llvm-commits
mailing list