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 @@ -945,11 +945,7 @@ loc, LLVM::LLVMPointerType::get(llvmValueType), storage.getResult(0)); // Load from the async value storage. - auto loaded = rewriter.create(loc, castedStorage.getResult()); - - // Cast from LLVM type to the expected value type. This cast will become - // no-op after lowering to LLVM. - return rewriter.create(loc, valueType, loaded); + return rewriter.create(loc, castedStorage.getResult()); } };