forked from OSchip/llvm-project
[VectorCombine] do not use magic number for undef mask element; NFC
This commit is contained in:
parent
eac4a60154
commit
54143e2bd5
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue