Skip to content

Commit 5fdb4e5

Browse files
committed
!fixup use clear instead of new smallvector.
1 parent d71ccb2 commit 5fdb4e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3040,7 +3040,6 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
30403040
SmallVector<Type *, 4> Tys;
30413041
for (VPValue *ArgOp : drop_end(operands()))
30423042
Tys.push_back(Ctx.Types.inferScalarType(ArgOp));
3043-
30443043
Type *ResultTy = Ctx.Types.inferScalarType(this);
30453044
InstructionCost ScalarCallCost =
30463045
Ctx.TTI.getCallInstrCost(CalledFn, ResultTy, Tys, Ctx.CostKind);
@@ -3063,8 +3062,8 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
30633062
}
30643063
// Skip operands that do not require extraction/scalarization and do not
30653064
// incur any overhead.
3066-
SmallVector<Type *> Tys;
30673065
SmallPtrSet<const VPValue *, 4> UniqueOperands;
3066+
Tys.clear();
30683067
for (auto *Op : drop_end(operands())) {
30693068
if (Op->isLiveIn() || isa<VPReplicateRecipe, VPPredInstPHIRecipe>(Op) ||
30703069
!UniqueOperands.insert(Op).second)

0 commit comments

Comments
 (0)