[Mlir-commits] [mlir] [mlir][bufferization] Canonicalize to_memref(to_tensor(x)) to a CopyO… (PR #126692)
Matthias Springer
llvmlistbot at llvm.org
Mon Feb 10 23:51:38 PST 2025
================
@@ -28,17 +28,20 @@ func.func @buffer_cast_of_tensor_load(%arg0: memref<?xf32>) -> memref<?xf32> {
// -----
// If the memrefs are not the same type, don't fold them.
-// If the memrefs are not cast-compatible (e.g. different address space), don't
-// canonicalize them either.
-// CHECK-LABEL: func @no_fold_buffer_cast_of_tensor_load(
+// If the memrefs are not cast-compatible but one can be copied into the other
+// (e.g. different address space), canonicalize them to copy.
----------------
matthias-springer wrote:
nit: `to alloc + copy`
https://github.com/llvm/llvm-project/pull/126692
More information about the Mlir-commits
mailing list