[llvm] r273117 - [X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduce SmallVector size accordingly.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 19 08:37:39 PDT 2016
Author: ctopper
Date: Sun Jun 19 10:37:39 2016
New Revision: 273117
URL: http://llvm.org/viewvc/llvm-project?rev=273117&view=rev
Log:
[X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduce SmallVector size accordingly.
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=273117&r1=273116&r2=273117&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Jun 19 10:37:39 2016
@@ -8687,6 +8687,8 @@ static SDValue lowerVectorShuffleAsPermu
SelectionDAG &DAG) {
assert(!VT.isFloatingPoint() &&
"This routine only supports integer vectors.");
+ assert(VT.is128BitVector() &&
+ "This routine only works on 128-bit vectors.");
assert(!isSingleInputShuffleMask(Mask) &&
"This routine should only be used when blending two inputs.");
assert(Mask.size() >= 2 && "Single element masks are invalid.");
@@ -8701,8 +8703,8 @@ static SDValue lowerVectorShuffleAsPermu
bool UnpackLo = NumLoInputs >= NumHiInputs;
auto TryUnpack = [&](MVT UnpackVT, int Scale) {
- SmallVector<int, 32> V1Mask(Mask.size(), -1);
- SmallVector<int, 32> V2Mask(Mask.size(), -1);
+ SmallVector<int, 16> V1Mask(Mask.size(), -1);
+ SmallVector<int, 16> V2Mask(Mask.size(), -1);
for (int i = 0; i < Size; ++i) {
if (Mask[i] < 0)
More information about the llvm-commits
mailing list