summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2016-06-19 15:37:39 +0000
committerCraig Topper <craig.topper@gmail.com>2016-06-19 15:37:39 +0000
commitbbb9a8d255881789efcd3939602faf6dab58879e (patch)
treee692fdccc726c8d0d6fe3cdaa126223450c19f1b /llvm/lib/Target
parent969457e0e30774726e25a4e9af5d13d7602ea625 (diff)
downloadbcm5719-llvm-bbb9a8d255881789efcd3939602faf6dab58879e.tar.gz
bcm5719-llvm-bbb9a8d255881789efcd3939602faf6dab58879e.zip
[X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduce SmallVector size accordingly.
llvm-svn: 273117
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index e428afd68c6..da9c13e0274 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -8687,6 +8687,8 @@ static SDValue lowerVectorShuffleAsPermuteAndUnpack(const SDLoc &DL, MVT VT,
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 lowerVectorShuffleAsPermuteAndUnpack(const SDLoc &DL, MVT VT,
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)
OpenPOWER on IntegriCloud