Skip to content

Commit

Permalink
Automerge: [VPlan] Use removeDeadRecipes in optimizeForVFAndUF (NFCI)
Browse files Browse the repository at this point in the history
Split off from llvm/llvm-project#108378.
  • Loading branch information
fhahn authored and github-actions[bot] committed Jan 10, 2025
2 parents a5c5789 + 5f5792a commit f77bbec
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 f77bbec

Please sign in to comment.