[llvm] r225718 - [X86][SSE] Minor regression fix for r225551
Simon Pilgrim
llvm-dev at redking.me.uk
Mon Jan 12 14:38:08 PST 2015
Author: rksimon
Date: Mon Jan 12 16:38:08 2015
New Revision: 225718
URL: http://llvm.org/viewvc/llvm-project?rev=225718&view=rev
Log:
[X86][SSE] Minor regression fix for r225551
r225551 vector byte shuffle optimization caused an assertion as fully zeroable vectors can be produced under certain circumstances. This fix drops the assert and returns a zero vector where the assert would have failed.
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=225718&r1=225717&r2=225718&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jan 12 16:38:08 2015
@@ -9652,7 +9652,6 @@ static SDValue lowerV16I8VectorShuffle(S
V2InUse |= (ZeroMask != V2Idx);
}
}
- assert((V1InUse || V2InUse) && "Shuffling to a zeroable vector");
if (V1InUse)
V1 = DAG.getNode(X86ISD::PSHUFB, DL, MVT::v16i8, V1,
@@ -9668,6 +9667,8 @@ static SDValue lowerV16I8VectorShuffle(S
return V1; // Single inputs are easy.
if (V2InUse)
return V2; // Single inputs are easy.
+ // Shuffling to a zeroable vector.
+ return getZeroVector(MVT::v16i8, Subtarget, DAG, DL);
}
// There are special ways we can lower some single-element blends.
More information about the llvm-commits
mailing list