[Mlir-commits] [mlir] [mlir][VectorToLLVM] emit `inbounds|nuw` GEP flags when lowering `vector.load/store` (PR #202118)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Jun 12 07:03:29 PDT 2026
banach-space wrote:
Thank you for your very comprehensive replies and the discussion - very insightful!
All in all looks good, but let me also tag @krzysz00 who co-reviewed similar patch for MemRef with me (https://github.com/llvm/llvm-project/pull/138984). This is quite nuanced, so an extra pair of eyes would be welcome.
> This patch follows up on https://github.com/llvm/llvm-project/pull/201180, which fixed affine-super-vectorize to emit in_bounds = [true] on vector.transfer_read/write when accesses are statically provable to be within bounds.
Note, we have actually been trying to drop `in_bounds` from xfer Ops. With masks, it feels redundant. I don't want people to connect that `Vector` attribute to LLVM's `inbounds` - there's very little (if any?) logic to properly track and update `Vector`'s `in_bounds`.
As for this change, here are my high-level suggestion:
* Remove the integration test.
* Update the `Vector` documentation to match `MemRef` with regard to generating the `inbounds` attribute.
* In a separate PR, make the logic that lowers to LLVM reject MemRef(s) with negative strides (to avoid violating `nuw`).
Thanks!
https://github.com/llvm/llvm-project/pull/202118
More information about the Mlir-commits
mailing list