[Mlir-commits] [mlir] [mlir][vector] Fix vector.gather lowering for strided memrefs. (PR #184706)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Mar 13 04:08:41 PDT 2026
================
@@ -200,6 +213,16 @@ struct Gather1DToConditionalLoads : OpRewritePattern<vector::GatherOp> {
auto baseOffsets = llvm::to_vector(op.getOffsets());
Value lastBaseOffset = baseOffsets.back();
+ // Compute the basis (memref shape) and linearized base offset once,
+ // outside the per-element loop.
+ SmallVector<OpFoldResult> basis;
+ Value linearizedBase;
+ if (useDelinearization) {
+ basis = memref::getMixedSizes(rewriter, loc, base);
----------------
banach-space wrote:
```suggestion
baseShape = memref::getMixedSizes(rewriter, loc, base);
```
https://github.com/llvm/llvm-project/pull/184706
More information about the Mlir-commits
mailing list