diff options
author | Youngsuk Kim <youngsuk.kim@hpe.com> | 2023-11-18 04:16:48 -0600 |
---|---|---|
committer | Youngsuk Kim <youngsuk.kim@hpe.com> | 2023-11-18 04:17:46 -0600 |
commit | b4db24e33008660d11d703c19d8affaf5f9a843e (patch) | |
tree | 3674eae31913054a393df1f9a2ef5e184ad5d12c /clang | |
parent | 303a7835ff833278a0de20cf5a70085b2ae8fee1 (diff) | |
download | llvm-b4db24e33008660d11d703c19d8affaf5f9a843e.zip llvm-b4db24e33008660d11d703c19d8affaf5f9a843e.tar.gz llvm-b4db24e33008660d11d703c19d8affaf5f9a843e.tar.bz2 |
[CGOpenMPRuntimeGPU] Replace unneeded use of CreatePointerBitCastOrAddrSpaceCast (NFC)
Opaque ptr cleanup effort (NFC)
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp index abecf52..2f7dd83 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -1418,9 +1418,7 @@ static llvm::Value *castValueToType(CodeGenFunction &CGF, llvm::Value *Val, return CGF.Builder.CreateIntCast(Val, LLVMCastTy, CastTy->hasSignedIntegerRepresentation()); Address CastItem = CGF.CreateMemTemp(CastTy); - Address ValCastItem = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast( - CastItem, Val->getType()->getPointerTo(CastItem.getAddressSpace()), - Val->getType()); + Address ValCastItem = CastItem.withElementType(Val->getType()); CGF.EmitStoreOfScalar(Val, ValCastItem, /*Volatile=*/false, ValTy, LValueBaseInfo(AlignmentSource::Type), TBAAAccessInfo()); |