[Mlir-commits] [mlir] [mlir][scf]: Add value bound for the computed upper bound of for loop (PR #126426)
Matthias Springer
llvmlistbot at llvm.org
Mon Feb 10 00:52:19 PST 2025
================
@@ -93,9 +99,18 @@ struct ForOpInterface
auto forOp = cast<ForOp>(op);
if (value == forOp.getInductionVar()) {
- // TODO: Take into account step size.
cstr.bound(value) >= forOp.getLowerBound();
cstr.bound(value) < forOp.getUpperBound();
+ // iv <= lb + ((ub-lb)/step - 1) * step
+ // This bound does not replace the `iv < ub` constraint mentioned above,
+ // since constraints involving the multiplication of two two constraint
----------------
matthias-springer wrote:
nit: double `two`
https://github.com/llvm/llvm-project/pull/126426
More information about the Mlir-commits
mailing list