diff --git a/mlir/lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp b/mlir/lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp index 0b5a5d8e71063..1d253632bb5a1 100644 --- a/mlir/lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp +++ b/mlir/lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp @@ -111,8 +111,8 @@ struct CloneOpConversion : public OpConversionPattern { rewriter.create(op->getLoc(), memrefType, alloc); } - rewriter.replaceOp(op, alloc); rewriter.create(loc, op.getInput(), alloc); + rewriter.replaceOp(op, alloc); return success(); } };