[VectorCombine] do not use magic number for undef mask element; NFC

This commit is contained in:
Sanjay Patel 2020-06-22 16:17:06 -04:00
parent eac4a60154
commit 54143e2bd5
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ static Value *createShiftShuffle(Value *Vec, unsigned OldIndex,
// to the new element index. Example for OldIndex == 2 and NewIndex == 0:
// ShufMask = { 2, undef, undef, undef }
auto *VecTy = cast<FixedVectorType>(Vec->getType());
SmallVector<int, 32> ShufMask(VecTy->getNumElements(), -1);
SmallVector<int, 32> ShufMask(VecTy->getNumElements(), UndefMaskElem);
ShufMask[NewIndex] = OldIndex;
Value *Undef = UndefValue::get(VecTy);
return Builder.CreateShuffleVector(Vec, Undef, ShufMask, "shift");