[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


================
@@ -598,6 +622,51 @@ OpOperand &MaterializeInDestinationOp::getSourceOperand() {
   return getOperation()->getOpOperand(0) /*source*/;
 }
 
+LogicalResult MaterializeInDestinationOp::verify() {
+  if (!isa<TensorType, BaseMemRefType>(getDest().getType()))
+    return emitOpError("'dest' must be a tensor or a memref");
----------------
maerhart wrote:

Nit: no invalid test for this error. A vector could be used to test this, right?

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


More information about the Mlir-commits mailing list