[Mlir-commits] [mlir] [MLIR] VectorEmulateNarrowType to support loading of unaligned vectors (PR #113411)

Han-Chung Wang llvmlistbot at llvm.org
Tue Oct 29 16:23:49 PDT 2024


================
@@ -42,9 +43,14 @@ bool isStaticShapeAndContiguousRowMajor(MemRefType type);
 ///   index to use in the linearized `memref`. The linearized index
 ///   is also scaled down by `dstBits`/`srcBits`. If `indices` is not provided
 ///   0, is returned for the linearized index.
+/// - If the size of the load/store is smaller than the linearized memref
+/// load/store, the memory region emulated is larger than the actual memory
+/// region needed. `intraVectorOffset` returns the element offset of the data
+/// relevant at the beginning.
 struct LinearizedMemRefInfo {
   OpFoldResult linearizedOffset;
   OpFoldResult linearizedSize;
+  OpFoldResult intraVectorOffset;
----------------
hanhanW wrote:

Good point about the "vector" term in the context of a memref.. Does `intraDataOffset` sound better?

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


More information about the Mlir-commits mailing list