[Mlir-commits] [mlir] [mlir][vector] Recompute load/store alignment when the index moves (PR #221385)
Federico Bruzzone
llvmlistbot at llvm.org
Sun Oct 18 08:30:18 PDT 2026
================
@@ -217,6 +218,15 @@ struct MaskableOpRewritePattern : OpRewritePattern<SourceOp> {
/// are not linearizable.
bool isLinearizableVector(VectorType type);
+/// Returns the alignment of an access to `memRefType` at `indices + offsets`,
+/// given that the access at `indices` is aligned to `alignment`. `offsets`
+/// apply to the trailing dimensions of the memref. Returns an empty alignment
+/// when `alignment` is empty, or when the byte distance between the two
+/// accesses is not static.
+llvm::MaybeAlign getAlignmentAfterOffset(llvm::MaybeAlign alignment,
----------------
FedericoBruzzone wrote:
This helper only depends on `MemRefType`, the offsets, and the alignment: nothing vector-specific. Can we please move it to `MemRefUtils.h`?
https://github.com/llvm/llvm-project/pull/221385
More information about the Mlir-commits
mailing list