[flang] [llvm] [VPlan] Expand WidenInt inductions with nuw/nsw (PR #163538)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 04:54:29 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.
----------------
artagnon wrote:

Thanks! I _think_ I managed to audit all replacements, and fix the issue. Kindly see top commit.

https://github.com/llvm/llvm-project/pull/163538


More information about the llvm-commits mailing list