[llvm] [VPlan] Add exit phi operands during initial construction (NFC). (PR #136455)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 13:53:35 PDT 2025
================
@@ -464,6 +478,12 @@ void VPlanTransforms::createLoopRegions(VPlan &Plan, Type *InductionTy,
VPBlockUtils::connectBlocks(ScalarPH, Plan.getScalarHeader());
if (!RequiresScalarEpilogueCheck) {
VPBlockUtils::connectBlocks(MiddleVPBB, ScalarPH);
+ // The exit blocks are unreachable, remove their recipes to make sure no
+ // users remain that may pessimize transforms.
+ for (auto *EB : Plan.getExitBlocks()) {
+ for (VPRecipeBase &R : make_early_inc_range(*EB))
+ R.eraseFromParent();
+ }
----------------
fhahn wrote:
Should be taken care of in d2ce88a939413a59148f366f9d8cdc91c6f9aafa, thanks
https://github.com/llvm/llvm-project/pull/136455
More information about the llvm-commits
mailing list