[llvm] [VPlan] Add VPlan-based addMinIterCheck, replace ILV for non-epilogue. (PR #153643)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 05:10:41 PDT 2025
================
@@ -3506,8 +3507,18 @@ VPlanTransforms::expandSCEVs(VPlan &Plan, ScalarEvolution &SE) {
ExpSCEV->replaceAllUsesWith(Exp);
if (Plan.getTripCount() == ExpSCEV)
Plan.resetTripCount(Exp);
+ InsertPt = std::next(ExpSCEV->getIterator());
ExpSCEV->eraseFromParent();
}
+ assert(none_of(*Entry, IsaPred<VPExpandSCEVRecipe>) &&
+ "VPExpandSCEVRecipes must be at the beginning of the entry block, "
+ "after any VPIRInstructions");
+ for (Instruction &I : *EntryBB) {
+ if (!Expander.isInsertedInstruction(&I) || isa<PHINode>(I))
----------------
fhahn wrote:
`getAllInsertedInstructions` is a set. I don't think even a SetVector would help, as the order the instructions are created may not be the same as their order in the basic block, as SCEVExpand tries to move the insertion point to an earlier point in some cases.
https://github.com/llvm/llvm-project/pull/153643
More information about the llvm-commits
mailing list