[Mlir-commits] [mlir] [mlir][memref] Support reducing copied dims to non-unit in reinterpret_cast elision (PR #209536)
ioana ghiban
llvmlistbot at llvm.org
Wed Jul 15 03:51:44 PDT 2026
================
@@ -268,18 +268,20 @@ getResultNonUnitDimsAndOffsetsForRC(memref::ReinterpretCastOp rc) {
/// %v = memref.load %src[0, ..., 0]
/// memref.store %v, %dst[delinearized(OFF)]
///
-/// // BEFORE (one collapsed non-unit dimension)
+/// // BEFORE (same-dimension static slice)
/// %strided = memref.reinterpret_cast %dst
-/// to offset: [OFF], sizes: [1, M, 1], strides: [M*N, N, 1]
+/// to offset: [OFF], sizes: [1, M, K], strides: [M*N, N, 1]
/// : memref<1xMxNxf32>
-/// to memref<1xMx1xf32, strided<[M*N, N, 1], offset: OFF>>
+/// to memref<1xMxKxf32, strided<[M*N, N, 1], offset: OFF>>
/// memref.copy %src, %strided
///
/// // AFTER
-/// // Assuming OFF delinearizes to [0, 0, OFF]:
----------------
ioghiban wrote:
Changed to `DELIN_OFF`. PTAL. Thank you.
https://github.com/llvm/llvm-project/pull/209536
More information about the Mlir-commits
mailing list