[Mlir-commits] [mlir] [mlir][vector] Verify non-unit strides on `masked/expand/compress` ops and fix `SparseVectorization` miscompilation (PR #210952)

Andrzej Warzyński llvmlistbot at llvm.org
Tue Jul 21 05:02:55 PDT 2026


banach-space wrote:

> Note: This is intentionally more permissive than vector.load/vector.store, the sparsifier legitimately produces masked loads on memrefs whose last-dim stride is contiguous by construction but not provable at the type level (see below).

This a bit confusing, TBH. If dynamic stride is considered as "unit" in some scenarios, then it should be considered as "unit" everywhere. Special-casing like this  can be quite problematic. For now, I would at least:
*  Add tests for `vector.load` + `vector.store` with dynamic strides (so that the difference in behaviour is documented through tests)
* Update your table from this [comment](https://github.com/llvm/llvm-project/pull/210952#issuecomment-5033367754) accordingly (it's very useful, thank you!).

Also, your summary is quite long and verbose for a relatively small change like this. All in all, the discussion is relevant, but please remember that the summary will end-up as a commit message. A commit message should provide a _brief_ overview of _what_ and _why_. Here are some additional tips https://chris.beams.io/git-commit (we [reccomend](https://mlir.llvm.org/getting_started/Contributing/) that all contributors to MLIR follow it source in MLIR).

I suggest that you open a GitHub issue for the wider discussion and to track all the relevant PRs. The summary for this change should be much shorter.`

Last, but not least, thank you so much for all the fixes, that is greatly appreciated 🙏🏻 

https://github.com/llvm/llvm-project/pull/210952


More information about the Mlir-commits mailing list