[Mlir-commits] [mlir] [mlir][vector] reject negative strides for `vector.load`/`vector.store` (PR #204611)
Federico Bruzzone
llvmlistbot at llvm.org
Fri Jun 19 02:35:53 PDT 2026
FedericoBruzzone wrote:
Please consider to read the following 🫶
In `ConvertVectorToLLVM` we are currently using `hasNonNegativeStrides` for lots of ops:
1. `VectorLoadStoreConversion<vector::LoadOp>` --> YES VERIFIER (with this PR)
2. `VectorLoadStoreConversion<vector::StoreOp>` --> YES VERIFIER (with this PR)
3. `VectorLoadStoreConversion<vector::MaskedLoadOp>` --> NO VERIFIER
4. `VectorLoadStoreConversion<vector::MaskedStoreOp>` --> NO VERIFIER
5. `VectorGatherOpConversion` --> YES VERIFIER (but doesn't check negative stride)
6. `VectorScatterOpConversion` --> YES VERIFIER (but doesn't check negative stride)
https://github.com/llvm/llvm-project/blob/a696a09aa7a40a3f764157b090367dd74399d863/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp#L226-L234
We should think about it. Do we want to have the verifier for them too? :D
I don't have a strong position on this (I have a limited view on the matter). Let me know; I'm open to updating the PR in this direction.
https://github.com/llvm/llvm-project/pull/204611
More information about the Mlir-commits
mailing list