[Mlir-commits] [mlir] [MLIR][MemRef] Extend narrow-type emulation for dynamic offsets (PR #196945)
Alan Li
llvmlistbot at llvm.org
Mon May 11 12:54:46 PDT 2026
================
@@ -32,51 +32,85 @@ using namespace mlir;
//===----------------------------------------------------------------------===//
/// Converts a memref::ReinterpretCastOp to the converted type. The result
-/// MemRefType of the old op must have a rank and stride of 1, with static
-/// offset and size. The number of bits in the offset must evenly divide the
-/// bitwidth of the new converted type.
+/// memref is linearized to a rank-1 byte view (or rank-0 if the source is
+/// rank-0). Dynamic offsets are accepted under the alignment contract that
+/// the caller guarantees the offset is a multiple of `dstBits / srcBits`;
+/// statically-provable misalignment is rejected.
----------------
lialan wrote:
let me do this in a follow up commit. Current PR uses `assumeAligned` flag.
https://github.com/llvm/llvm-project/pull/196945
More information about the Mlir-commits
mailing list