[llvm] [VPlan] Delay adding canonical IV increment and exit branches. (PR #82270)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 15 11:23:23 PDT 2024
================
@@ -8555,7 +8551,7 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
// When not folding the tail, we know that the induction increment will not
// overflow.
bool HasNUW = Style == TailFoldingStyle::None;
- addCanonicalIVRecipes(*Plan, Legal->getWidestInductionType(), HasNUW, DL);
+ addCanonicalIV(*Plan, Legal->getWidestInductionType(), HasNUW, DL);
----------------
ayalz wrote:
```suggestion
addCanonicalIV(*Plan, Legal->getWidestInductionType(), DL);
```
along with the cleanup of code above that sets HasNUW, although Style is still needed by addActiveLaneMask() below? Note that IVUpdateMayOverflow is now computed for BestVF rather than across all VF's in range, when setting canonical IV but not active lane mask below? I.e., patch is not NFC.
https://github.com/llvm/llvm-project/pull/82270
More information about the llvm-commits
mailing list