Author: Youngsuk Kim Date: 2023-11-25T11:28:18-06:00 New Revision: bc6b632723f8a025c7daa78c82f7d2ad1962a4e9
URL: https://github.com/llvm/llvm-project/commit/bc6b632723f8a025c7daa78c82f7d2ad1962a4e9 DIFF: https://github.com/llvm/llvm-project/commit/bc6b632723f8a025c7daa78c82f7d2ad1962a4e9.diff LOG: [CGOpenMPRuntimeGPU] Remove no-op ptr-to-ptr bitcasts (NFC) Opaque ptr cleanup effort Added: Modified: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp index 9b8fbbdf8046787..7ddc67e8a04ab64 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -1837,12 +1837,7 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, {llvm::Constant::getNullValue(CGM.Int64Ty), WarpID}); // Casting to actual data type. // MediumPtr = (CopyType*)MediumPtrAddr; - Address MediumPtr( - Bld.CreateBitCast( - MediumPtrVal, - CopyType->getPointerTo( - MediumPtrVal->getType()->getPointerAddressSpace())), - CopyType, Align); + Address MediumPtr(MediumPtrVal, CopyType, Align); // elem = *elemptr //*MediumPtr = elem @@ -1889,12 +1884,7 @@ static llvm::Value *emitInterWarpCopyFunction(CodeGenModule &CGM, TransferMedium->getValueType(), TransferMedium, {llvm::Constant::getNullValue(CGM.Int64Ty), ThreadID}); // SrcMediumVal = *SrcMediumPtr; - Address SrcMediumPtr( - Bld.CreateBitCast( - SrcMediumPtrVal, - CopyType->getPointerTo( - SrcMediumPtrVal->getType()->getPointerAddressSpace())), - CopyType, Align); + Address SrcMediumPtr(SrcMediumPtrVal, CopyType, Align); // TargetElemPtr = (CopyType*)(SrcDataAddr[i]) + I Address TargetElemPtrPtr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits