[llvm] [VPlan] Delay adding canonical IV increment. (PR #82270)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 07:18:21 PST 2024
================
@@ -7674,6 +7674,17 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
// TODO: Move to VPlan transform stage once the transition to the VPlan-based
// cost model is complete for better cost estimates.
+ bool IVUpdateMayOverflow =
+ !isIndvarOverflowCheckKnownFalse(&CM, BestVF, BestUF);
+ TailFoldingStyle Style = CM.getTailFoldingStyle(IVUpdateMayOverflow);
+ bool WithoutRuntimeCheck =
+ Style == TailFoldingStyle::DataAndControlFlowWithoutRuntimeCheck;
+ // Use NUW for the induction increment if we proved that it won't overflow in
+ // the vector loop or when not folding the tail. In the later case, we know
----------------
ayalz wrote:
```suggestion
// the vector loop or when not folding the tail. In the latter case, we know
```
https://github.com/llvm/llvm-project/pull/82270
More information about the llvm-commits
mailing list