[flang-commits] [flang] [llvm] [VPlan] Expand WidenInt inductions with nuw/nsw (PR #163538)
Luke Lau via flang-commits
flang-commits at lists.llvm.org
Fri Oct 24 03:37:57 PDT 2025
================
@@ -7549,16 +7549,20 @@ createWidenInductionRecipes(PHINode *Phi, Instruction *PhiOrTrunc,
assert(SE.isLoopInvariant(IndDesc.getStep(), &OrigLoop) &&
"step must be loop invariant");
+ // It is always safe to copy over the NoWrap and FastMath flags. In
+ // particular, when folding tail by masking, the masked-off lanes are never
+ // executed, so it is safe.
----------------
lukel97 wrote:
Isn't the widened canonical IV done through `VPWidenCanonicalIVRecipe` which won't propagate flags?
https://github.com/llvm/llvm-project/pull/163538
More information about the flang-commits
mailing list