Skip to content

Commit

Permalink
[VPlan] Use removeDeadRecipes in optimizeForVFAndUF (NFCI)
Browse files Browse the repository at this point in the history
Split off from #108378.
  • Loading branch information
fhahn committed Jan 2, 2025
1 parent 5236e3d commit 5f5792a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,11 +842,11 @@ void VPlanTransforms::optimizeForVFAndUF(VPlan &Plan, ElementCount BestVF,
VPInstruction::BranchOnCond,
{Plan.getOrAddLiveIn(ConstantInt::getTrue(Ctx))}, Term->getDebugLoc());

SmallVector<VPValue *> PossiblyDead(Term->operands());
Term->eraseFromParent();
for (VPValue *Op : PossiblyDead)
recursivelyDeleteDeadRecipes(Op);
ExitingVPBB->appendRecipe(BOC);

VPlanTransforms::removeDeadRecipes(Plan);

Plan.setVF(BestVF);
Plan.setUF(BestUF);
// TODO: Further simplifications are possible
Expand Down

0 comments on commit 5f5792a

Please sign in to comment.