diff --git a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp --- a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp +++ b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp @@ -592,7 +592,7 @@ CallOp call = cast(op); rewriter.replaceOpWithNewOp(op, resultTypes, call.callee(), - call.getOperands()); + operands); return success(); } @@ -733,7 +733,7 @@ // async API await function call. if (!isInCoroutine) rewriter.create(loc, TypeRange(), blockingAwaitFuncName, - ValueRange(op->getOperand(0))); + ValueRange(operands[0])); // Inside the coroutine we convert await operation into coroutine suspension // point, and resume execution asynchronously. @@ -755,8 +755,8 @@ // Call async runtime API to resume a coroutine in the managed thread when // the async await argument becomes ready. - SmallVector awaitAndExecuteArgs = { - await.getOperand(), coro.coroHandle, resumePtr.res()}; + SmallVector awaitAndExecuteArgs = {operands[0], coro.coroHandle, + resumePtr.res()}; builder.create(loc, TypeRange(), coroAwaitFuncName, awaitAndExecuteArgs);