Skip to content

Commit 4fe7b16

Browse files
committed
[mlir] Remove unnecessary llvm.mlir.cast in AsyncToLLVM lowering.
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D94400
1 parent 6dcf920 commit 4fe7b16

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -945,13 +945,7 @@ class AwaitValueOpLowering : public AwaitOpLoweringBase<AwaitOp, ValueType> {
945945
loc, LLVM::LLVMPointerType::get(llvmValueType), storage.getResult(0));
946946

947947
// Load from the async value storage.
948-
auto loaded = rewriter.create<LLVM::LoadOp>(loc, castedStorage.getResult());
949-
950-
// Cast from LLVM type to the expected value type if necessary. This cast
951-
// will become no-op after lowering to LLVM.
952-
if (valueType == loaded.getType())
953-
return loaded;
954-
return rewriter.create<LLVM::DialectCastOp>(loc, valueType, loaded);
948+
return rewriter.create<LLVM::LoadOp>(loc, castedStorage.getResult());
955949
}
956950
};
957951

0 commit comments

Comments
 (0)