From 33f8e1571a7f673cf8d24d4003d3517a75248b02 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 19 Jun 2016 15:37:39 +0000 Subject: [PATCH] [X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduce SmallVector size accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273117 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelLowering.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index e428afd68c6..da9c13e0274 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/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 V1Mask(Mask.size(), -1); - SmallVector V2Mask(Mask.size(), -1); + SmallVector V1Mask(Mask.size(), -1); + SmallVector V2Mask(Mask.size(), -1); for (int i = 0; i < Size; ++i) { if (Mask[i] < 0) -- 2.11.0