[Mlir-commits] [mlir] [mlir][DialectUtils] Fix 0 step handling in `constantTripCount` (PR #177329)
Markus Böck
llvmlistbot at llvm.org
Sun Jan 25 07:07:43 PST 2026
zero9178 wrote:
> > I think we must also document this in the scf.for semantics.
>
> I'm not quite sure what to do with `scf.for` yet. (Allowing "step size 0" or explicitly marking it as UB.) I'd rather discuss that on a separate PR if you don't mind.
>
> This PR is just updating a helper function that is not specific to `scf.for`. The only functional change is that for "step size 0" it returns `std::nullopt` in some cases. I.e., "static trip count unknown". Imo, that is consistent with the current semantics of `scf.for`.
Makes sense to me, thank you!
https://github.com/llvm/llvm-project/pull/177329
More information about the Mlir-commits
mailing list