[llvm] [VPlan] Update scalar induction resume values in VPlan. (PR #110577)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 17 14:24:49 PST 2024
================
@@ -7808,6 +7813,27 @@ EpilogueVectorizerMainLoop::createEpilogueVectorizedLoopSkeleton(
// the second pass for the scalar loop. The induction resume values for the
// inductions in the epilogue loop are created before executing the plan for
// the epilogue loop.
+ VPBasicBlock *ScalarPHVPBB = Plan.getScalarPreheader();
+ VPBuilder ScalarPHBuilder(ScalarPHVPBB, ScalarPHVPBB->begin());
+ for (VPRecipeBase &R :
+ Plan.getVectorLoopRegion()->getEntryBasicBlock()->phis()) {
----------------
ayalz wrote:
Iterating over the IRI's of scalar header instead of the integer/fp induction header phi recipes of vector header, relieves the need for such a mapping - to find PhiR which wraps IndPhi (by searching thru the recipes of scalar header for each IndPhi), as in plural createInductionResumeValues()?
https://github.com/llvm/llvm-project/pull/110577
More information about the llvm-commits
mailing list