Skip to content

Commit

Permalink
[CGOpenMPRuntimeGPU] Replace unneeded use of CreatePointerBitCastOrAd…
Browse files Browse the repository at this point in the history
…drSpaceCast (NFC)

Opaque ptr cleanup effort (NFC)
  • Loading branch information
JOE1994 committed Nov 18, 2023
1 parent 303a783 commit b4db24e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit b4db24e

Please sign in to comment.