[Mlir-commits] [mlir] [mlir][bufferization] `MaterializeInDestinationOp`: Support memref destinations (PR #68074)

Martin Erhart llvmlistbot at llvm.org
Fri Oct 6 02:26:13 PDT 2023


================
@@ -542,25 +542,35 @@ bool MaterializeInDestinationOp::bufferizesToMemoryRead(
 
 bool MaterializeInDestinationOp::bufferizesToMemoryWrite(
     OpOperand &opOperand, const AnalysisState &state) {
-  return &opOperand == &getDestMutable();
+  return isa<TensorType>(getDest().getType()) &&
+         &opOperand == &getDestMutable();
 }
 
 AliasingValueList
 MaterializeInDestinationOp::getAliasingValues(OpOperand &opOperand,
                                               const AnalysisState &state) {
-  if (&opOperand == &getDestMutable())
+  if (isa<TensorType>(getDest().getType()) && &opOperand == &getDestMutable())
----------------
maerhart wrote:

Same as above.

https://github.com/llvm/llvm-project/pull/68074


More information about the Mlir-commits mailing list