[llvm] [VPlan] Run initial recipe simplification on VPlan0. (PR #176828)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 11 06:06:57 PST 2026
================
@@ -3414,8 +3432,13 @@ void VPlanTransforms::replaceSymbolicStrides(
// evolution.
auto CanUseVersionedStride = [&Plan](VPUser &U, unsigned) {
auto *R = cast<VPRecipeBase>(&U);
- return R->getRegion() ||
- R->getParent() == Plan.getVectorLoopRegion()->getSinglePredecessor();
+ if (R->getRegion())
+ return true;
+ // For VPlan0 (no VectorLoopRegion yet), allow replacement in the loop body.
+ auto *VectorLoopRegion = Plan.getVectorLoopRegion();
+ if (!VectorLoopRegion)
+ return !isa<VPIRBasicBlock>(R->getParent());
+ return R->getParent() == VectorLoopRegion->getSinglePredecessor();
----------------
fhahn wrote:
ah yes, that's left over from some planned follow-up changes, removed, thanks
https://github.com/llvm/llvm-project/pull/176828
More information about the llvm-commits
mailing list