Skip to content

Commit e374048

Browse files
committed
Cleanup SmallVector initialization
1 parent 7b99818 commit e374048

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ bool VectorCombine::isExtractExtractCheap(ExtractElementInst *Ext0,
488488
// TODO: The cost model has an option for a "broadcast" shuffle
489489
// (splat-from-element-0), but no option for a more general splat.
490490
if (auto *FixedVecTy = dyn_cast<FixedVectorType>(VecTy)) {
491-
SmallVector<int> ShuffleMask;
492-
ShuffleMask.append(FixedVecTy->getNumElements(), PoisonMaskElem);
491+
SmallVector<int> ShuffleMask(FixedVecTy->getNumElements(),
492+
PoisonMaskElem);
493493
ShuffleMask[BestInsIndex] = BestExtIndex;
494494
NewCost += TTI.getShuffleCost(TargetTransformInfo::SK_PermuteSingleSrc,
495495
VecTy, ShuffleMask);

0 commit comments

Comments
 (0)