[llvm] r176058 - Fix PR10499
Michael Liao
michael.liao at intel.com
Mon Feb 25 15:01:04 PST 2013
Author: hliao
Date: Mon Feb 25 17:01:03 2013
New Revision: 176058
URL: http://llvm.org/viewvc/llvm-project?rev=176058&view=rev
Log:
Fix PR10499
- Check whether SSE is available before lowering all 1s vector building with
PCMPEQD, which is only available from SSE2
Added:
llvm/trunk/test/CodeGen/X86/pr10499.ll
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=176058&r1=176057&r2=176058&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Feb 25 17:01:03 2013
@@ -5344,7 +5344,7 @@ X86TargetLowering::LowerBUILD_VECTOR(SDV
// Vectors containing all ones can be matched by pcmpeqd on 128-bit width
// vectors or broken into v4i32 operations on 256-bit vectors. AVX2 can use
// vpcmpeqd on 256-bit vectors.
- if (ISD::isBuildVectorAllOnes(Op.getNode())) {
+ if (ISD::isBuildVectorAllOnes(Op.getNode()) && Subtarget->hasSSE2()) {
if (VT == MVT::v4i32 || (VT == MVT::v8i32 && Subtarget->hasInt256()))
return Op;
Added: llvm/trunk/test/CodeGen/X86/pr10499.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr10499.ll?rev=176058&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr10499.ll (added)
+++ llvm/trunk/test/CodeGen/X86/pr10499.ll Mon Feb 25 17:01:03 2013
@@ -0,0 +1,14 @@
+; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=corei7-avx -mattr=-sse2
+
+; No check as PR10499 is a crashing bug.
+
+define void @autogen_24438_500() {
+BB:
+ %I = insertelement <8 x i32> undef, i32 -1, i32 4
+ %BC = bitcast <8 x i32> %I to <8 x float>
+ br label %CF
+
+CF: ; preds = %CF, %BB
+ %ZE = fpext <8 x float> %BC to <8 x double>
+ br label %CF
+}
More information about the llvm-commits
mailing list