[Mlir-commits] [mlir] [mlir][vector] Add opt-in `inbounds`/`nneg` flags to `vector.load`/`vector.store` (PR #202118)
Krzysztof Drewniak
llvmlistbot at llvm.org
Sun Jun 14 22:56:22 PDT 2026
krzysz00 wrote:
> memref.load/store currently emit inbounds|nuw unconditionally, which is unsound for negative strides
I think we might want to put up a docs patch explicitly clarifying if negative strides are allowed (I can't see anything forbidding them, but I don't have a good sense of the usecase, and stuff like `vector.load` is absolutely not set up to read "backwards" for statically negative strides). We might also want to check if dynamic/unknown strides can be negative, if that should be signaled somewhere, etc.
I thought I'd seen some spots forbidding negative strides, but I seem to have been wrong.
(But yeah, if negative strides are allowed, then memref.load's lowering is unsound)
https://github.com/llvm/llvm-project/pull/202118
More information about the Mlir-commits
mailing list