[Mlir-commits] [mlir] [mlir][vector] extend `createReadOrMaskedRead`/`createWriteOrMaskedWrite` with permutation map support (PR #202766)
Federico Bruzzone
llvmlistbot at llvm.org
Wed Jun 10 06:17:49 PDT 2026
================
@@ -224,11 +224,17 @@ bool isLinearizableVector(VectorType type);
/// `useInBoundsInsteadOfMasking` to `true` to use the "in_bounds" attribute
/// instead of explicit masks.
///
-/// Note: all read offsets are set to 0.
+/// When \p permutationMap is provided the in_bounds attribute is inferred from
+/// it: dimension i is in-bounds when the map result is an AffineDimExpr
+/// pointing to a static memref dimension divisible by the vector size, or an
+/// AffineConstantExpr (broadcast). Custom \p indices must also be supplied in
+/// that case; if \p indices is empty, all offsets default to 0.
----------------
FedericoBruzzone wrote:
> Also, why do we need indices when permutation map is specified?
`indices` is orthogonal to `permutationMap`. It's needed because the SuperVectorize reads/writes at loop induction variable offsets rather than 0, which the utility previously hardcoded.
https://github.com/llvm/llvm-project/pull/202766
More information about the Mlir-commits
mailing list