Skip to content

Commit 5f5792a

Browse files
committed
[VPlan] Use removeDeadRecipes in optimizeForVFAndUF (NFCI)
Split off from #108378.
1 parent 5236e3d commit 5f5792a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,11 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
842842
VPInstruction::BranchOnCond,
843843
{Plan.getOrAddLiveIn(ConstantInt::getTrue(Ctx))}, Term->getDebugLoc());
844844

845-
SmallVector<VPValue *> PossiblyDead(Term->operands());
846845
Term->eraseFromParent();
847-
for (VPValue *Op : PossiblyDead)
848-
recursivelyDeleteDeadRecipes(Op);
849846
ExitingVPBB->appendRecipe(BOC);
847+
848+
VPlanTransforms::removeDeadRecipes(Plan);
849+
850850
Plan.setVF(BestVF);
851851
Plan.setUF(BestUF);
852852
// TODO: Further simplifications are possible

0 commit comments

Comments
 (0)