diff --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp --- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp +++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp @@ -437,8 +437,8 @@ return funcOp->emitError() << "cannot bufferize bodiless function that " << "returns a tensor"; FunctionType bufferizedFuncType = getBufferizedFunctionType( - funcOp.getContext(), funcOp.getFunctionType().getInputs(), TypeRange{}, - state.getOptions()); + funcOp.getContext(), funcOp.getFunctionType().getInputs(), + funcOp.getFunctionType().getResults(), state.getOptions()); funcOp.setType(bufferizedFuncType); return success(); }