Skip to content

Commit b4db24e

Browse files
committed
[CGOpenMPRuntimeGPU] Replace unneeded use of CreatePointerBitCastOrAddrSpaceCast (NFC)
Opaque ptr cleanup effort (NFC)
1 parent 303a783 commit b4db24e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,9 +1418,7 @@ static llvm::Value *castValueToType(CodeGenFunction &CGF, llvm::Value *Val,
14181418
return CGF.Builder.CreateIntCast(Val, LLVMCastTy,
14191419
CastTy->hasSignedIntegerRepresentation());
14201420
Address CastItem = CGF.CreateMemTemp(CastTy);
1421-
Address ValCastItem = CGF.Builder.CreatePointerBitCastOrAddrSpaceCast(
1422-
CastItem, Val->getType()->getPointerTo(CastItem.getAddressSpace()),
1423-
Val->getType());
1421+
Address ValCastItem = CastItem.withElementType(Val->getType());
14241422
CGF.EmitStoreOfScalar(Val, ValCastItem, /*Volatile=*/false, ValTy,
14251423
LValueBaseInfo(AlignmentSource::Type),
14261424
TBAAAccessInfo());

0 commit comments

Comments
 (0)