[llvm] [VPlan] Make canonical IV part of the region (PR #156262)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 14:27:46 PDT 2026
================
@@ -461,10 +482,8 @@ static void createLoopRegion(VPlan &Plan, VPBlockBase *HeaderVPB) {
static void addCanonicalIVRecipes(VPlan &Plan, VPBasicBlock *HeaderVPBB,
VPBasicBlock *LatchVPBB, Type *IdxTy,
DebugLoc DL) {
- auto *StartV = Plan.getConstantInt(IdxTy, 0);
-
- // Add a VPCanonicalIVPHIRecipe starting at 0 to the header.
- auto *CanonicalIVPHI = new VPCanonicalIVPHIRecipe(StartV, DL);
+ // Add a VPPhi for the canonical IV starting at 0 as first recipe in header.
+ auto *CanonicalIVPHI = new VPPhi(Plan.getConstantInt(IdxTy, 0), {}, DL);
----------------
ayalz wrote:
```suggestion
auto *CanonicalIVPHI = new VPPhi(Plan.getZero(IdxTy), {}, DL);
```
https://github.com/llvm/llvm-project/pull/156262
More information about the llvm-commits
mailing list