[Mlir-commits] [mlir] [mlir][vector] Add opt-in `inbounds`/`nneg` flags to `vector.load`/`vector.store` (PR #202118)
Krzysztof Drewniak
llvmlistbot at llvm.org
Mon Jun 15 08:21:47 PDT 2026
krzysz00 wrote:
> I do not think we should expose `inbounds` / `nneg` at the Vector dialect level unless there is a clear dialect-level semantic need for them.
There is!
`inbounds` means "for all dimensions d, 0 <= indices[d] < size(d)` - and you could hook RuntimeOpVeriifcation to check that
`nneg` means `for all dimensions d, 0 <= indices[d] <= signed_max(index)`
These are useful restricted forms of `vector.load` that can be used for optimization (ex. when flattening memrefs, knowing a vector.load is inbounds lets you mark the linearization of the indices as `disjoint`, enabling additional foldings / simplifications)
https://github.com/llvm/llvm-project/pull/202118
More information about the Mlir-commits
mailing list