[Mlir-commits] [mlir] [mlir][vector] Add unroll patterns for vector.load and vector.store (PR #143420)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Jun 11 08:09:14 PDT 2025
================
@@ -54,6 +54,33 @@ static SmallVector<Value> sliceTransferIndices(ArrayRef<int64_t> elementOffsets,
return slicedIndices;
}
+// Compute the new indices for vector.load/store by adding `offsets` to
+// `originalIndices`.
+// It assumes m <= n (m = offsets.size(), n = originalIndices.size())
+// Last m of `originalIndices` will be updated.
----------------
banach-space wrote:
If the purpose of the method is to add two containers, then
```suggestion
// If m < n (m = offsets.size(), n = originalIndices.size()), then only the trailing m values in `originalIndices` are updated.
```
This will be sufficient to communicate that `n >= m`. And then, `assert` inside the method can verify that.
https://github.com/llvm/llvm-project/pull/143420
More information about the Mlir-commits
mailing list