[Mlir-commits] [mlir] [mlir][scf] Use a signed compare for the parallel loop tiling in-bound check (PR #226130)
Matthias Springer
llvmlistbot at llvm.org
Thu Sep 24 17:52:37 PDT 2026
matthias-springer wrote:
We may also want to add wording such as this to the documentation in the `.td` file. (This is taken from `scf.for`.)
```
1. The trip count n is max(0, ceil((UB - LB) / Step)) and the induction variable takes the values LB + j*Step for j = 0, ..., n - 1 in that order.
2. No-overflow condition: LB + n*Step must be representable in the type of the induction variable. Otherwise the behavior is undefined. Leaving this case undefined lets the loop be lowered to a plain increment-and-compare on a single induction register without having to account for wraparound.
```
https://github.com/llvm/llvm-project/pull/226130
More information about the Mlir-commits
mailing list