[llvm] [VPlan] Add exit phi operands during initial construction (NFC). (PR #136455)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 01:56:40 PDT 2025
================
@@ -464,6 +477,12 @@ void VPlanTransforms::createLoopRegions(VPlan &Plan, Type *InductionTy,
VPBlockUtils::connectBlocks(ScalarPH, Plan.getScalarHeader());
if (!RequiresScalarEpilogueCheck) {
VPBlockUtils::connectBlocks(MiddleVPBB, ScalarPH);
+ // The exit blocks are dead, remove any recipes to make sure no users remain
+ // that may pessimize transforms.
----------------
fhahn wrote:
Doing this elsewhere is a bit tricky at the moment; the phis themselves cannot be removed, as they are part of the wrapped IR leave nodes.
We could empty them here, but some transforms may later have to add them back in the future, so might be better to keep as-is.
https://github.com/llvm/llvm-project/pull/136455
More information about the llvm-commits
mailing list