[Mlir-commits] [mlir] [SCF] Make loop prefectching safe for overflow (PR #172066)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Dec 12 12:08:15 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);
----------------
MaheshRavishankar wrote:
Yeah, exactly. I dont know how to phrase the question yet, but I think we can add this nsw trait if the original loop as some way of saying `lb + i * step` does not overflow. Still formalizing the whole thing so I am not ready to raise a broader question here yet.
https://github.com/llvm/llvm-project/pull/172066
More information about the Mlir-commits
mailing list