[Mlir-commits] [mlir] [SCF] Make loop prefectching safe for overflow (PR #172066)

Thomas Raoux llvmlistbot at llvm.org
Fri Dec 12 12:00:57 PST 2025


================
@@ -283,7 +283,8 @@ LogicalResult LoopPipelinerInternal::emitPrologue(RewriterBase &rewriter) {
           arith::MulIOp::create(
               rewriter, loc, step,
               arith::ConstantOp::create(rewriter, loc,
-                                        rewriter.getIntegerAttr(t, i))));
+                                        rewriter.getIntegerAttr(t, i))),
+          arith::IntegerOverflowFlags::nsw);
----------------
ThomasRaoux wrote:

well it can be that would mean the original loop induction variable also overflows

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


More information about the Mlir-commits mailing list