[Mlir-commits] [mlir] [mlir][memref] Rewrite scalar `memref.copy` through reinterpret_cast into load/store (PR #186118)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Mar 13 02:42:14 PDT 2026
================
@@ -0,0 +1,321 @@
+// RUN: mlir-opt -memref-bypass-reinterpret-cast %s -split-input-file
+// | FileCheck %s
+
+//===----------------------------------------------------------------------===//
+// Positive tests
+//===----------------------------------------------------------------------===//
+
+// CHECK-LABEL: func.func private @concat_zero_offset()
+func.func private @concat_zero_offset() {
+ // CHECK: %[[SRC:.*]] = memref.alloc() : memref<1x1xf32>
+ %alloc = memref.alloc() : memref<1x1xf32>
+ // CHECK: %[[DST:.*]] = memref.alloc() : memref<1x108xf32>
+ %alloc_0 = memref.alloc() : memref<1x108xf32>
+
+ // reinterpret_cast remains
----------------
banach-space wrote:
What if you run DCE? It would be good to keep these a bit leaner.
https://github.com/llvm/llvm-project/pull/186118
More information about the Mlir-commits
mailing list