[Mlir-commits] [mlir] [mlir][DialectUtils] Fix 0 step handling in `constantTripCount` (PR #177329)
Matthias Springer
llvmlistbot at llvm.org
Sun Jan 25 06:37:56 PST 2026
matthias-springer 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`.
https://github.com/llvm/llvm-project/pull/177329
More information about the Mlir-commits
mailing list