[Mlir-commits] [mlir] [mlir][vector] Add opt-in `inbounds`/`nneg` flags to `vector.load`/`vector.store` (PR #202118)
Federico Bruzzone
llvmlistbot at llvm.org
Tue Jun 16 04:47:22 PDT 2026
FedericoBruzzone wrote:
Thanks for the clarification @banach-space :D
The direction is clear and I fully agree with it.
Sorry if I can be boring, but can you confirm the plan 🙏?
1. Remove inbounds/nneg from vector.load/vector.store entirely.
2. Add an opt-in option to ConvertVectorToLLVM (e.g. `--enable-gep-inbounds-nuw`, default false?) that gates the inbounds|nuw flag emission on the GEP, keeping the scope strictly within the lowering pass.
3. No Vector dialect doc update in this patch.
4. For now, we don't check the negative stride for vectors. While I'll open another PR for negative strides on memref (which are unsound), updating also the docs accordingly.
**Question:** Should the default be false (opt-in) or true (opt-out)?
I'd lean toward `false` to be conservative, but happy to go with your preference.
https://github.com/llvm/llvm-project/pull/202118
More information about the Mlir-commits
mailing list