[Mlir-commits] [mlir] [mlir][vector] Fix vector.gather lowering for strided memrefs. (PR #184706)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Mar 5 08:57:57 PST 2026


banach-space wrote:

> This was recently discussed and clarified in https://github.com/llvm/llvm-project/pull/181357/changes#diff-3cbcc8f6c740f2d6e16f5a0c19daf4bb8224ad92d9e430fc10c935587a67dcceR2093-R2095
> 
> > Importantly, for MemRefs, `indices` are interpreted assuming an identity (contiguous) MemRef layout and do not account for non-identity strides.

Thanks for bringing this up, Jakub. The corresponding RFC is here:
* https://discourse.llvm.org/t/rfc-semantics-of-vector-gather-indices-with-strided-memrefs/

Indeed, `vector.gather` and `vector.scatter` effectively ignore strides and that is intended.

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


More information about the Mlir-commits mailing list