[llvm] [VPlan] Make canonical IV part of the region (PR #156262)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 15 18:06:23 PDT 2026
================
@@ -3300,14 +3305,15 @@ void VPlanTransforms::addExplicitVectorLength(
VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion();
VPBasicBlock *Header = LoopRegion->getEntryBasicBlock();
- auto *CanonicalIVPHI = LoopRegion->getCanonicalIV();
- auto *CanIVTy = LoopRegion->getCanonicalIVType();
- VPValue *StartV = CanonicalIVPHI->getStartValue();
+ auto *CanonicalIV = LoopRegion->getCanonicalIV();
+ auto *CanIVTy = CanonicalIV->getType();
+ VPValue *StartV = Plan.getConstantInt(CanIVTy, 0);
+ auto *CanonicalIVIncrement = LoopRegion->getOrCreateCanonicalIVIncrement();
// Create the CurrentIteration recipe in the vector loop.
auto *CurrentIteration =
new VPCurrentIterationPHIRecipe(StartV, DebugLoc::getUnknown());
----------------
ayalz wrote:
Independent: CanIV can also offer DL
https://github.com/llvm/llvm-project/pull/156262
More information about the llvm-commits
mailing list