[llvm] [LV] Use IVUpdateMayOverflow to set HasNUW. (PR #111758)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 7 03:26:23 PST 2024
================
@@ -9076,9 +9076,11 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
DebugLoc DL = getDebugLocFromInstOrOperands(Legal->getPrimaryInduction());
TailFoldingStyle Style = CM.getTailFoldingStyle(IVUpdateMayOverflow);
- // When not folding the tail, we know that the induction increment will not
- // overflow.
- bool HasNUW = Style == TailFoldingStyle::None;
+ // 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:
post-commit nit: "later" >> "latter"
https://github.com/llvm/llvm-project/pull/111758
More information about the llvm-commits
mailing list