[Mlir-commits] [mlir] [mlir][DialectUtils] Fix 0 step handling in `constantTripCount` (PR #177329)
Markus Böck
llvmlistbot at llvm.org
Sun Jan 25 06:08:31 PST 2026
https://github.com/zero9178 commented:
I think we must also document this in the `scf.for` semantics. Right now it reads
> The step is a value of same type but required to be positive, the lower and upper bounds can be also negative or zero.
which means that technically step must be larger than 0 right? (i.e. right now we implement `mustprogress` semantics?). For this PR it should allow 0 and say that it loops infinitely.
(Side note: If we were to disallow it, then we should specific that 0 causes undefined behaviour)
https://github.com/llvm/llvm-project/pull/177329
More information about the Mlir-commits
mailing list