[Mlir-commits] [mlir] [mlir][bufferization] Fix to_buffer being incorrectly hoisted by LICM (PR #188997)
Matthias Springer
llvmlistbot at llvm.org
Mon Mar 30 05:05:44 PDT 2026
================
@@ -874,14 +874,61 @@ struct DimOfCastOp : public OpRewritePattern<memref::DimOp> {
}
};
+/// Deduplicate bufferization.to_buffer operations with the same tensor operand,
+/// result type, and read_only attribute within the same block. Two to_buffer
----------------
matthias-springer wrote:
If this really the case? `to_buffer` bufferizes to a memory read and a memory write, so two `to_buffer` ops back-to-back could trigger a copy.
https://github.com/llvm/llvm-project/pull/188997
More information about the Mlir-commits
mailing list