[llvm] c0a1fcd - [llvm][IRMover] Remove no-op ptr-to-ptr bitcast (NFC)

Youngsuk Kim via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 07:55:02 PST 2023


Author: Youngsuk Kim
Date: 2023-11-21T09:51:19-06:00
New Revision: c0a1fcd3bf8ead39e8f0290a8a0af1e0367c7cad

URL: https://github.com/llvm/llvm-project/commit/c0a1fcd3bf8ead39e8f0290a8a0af1e0367c7cad
DIFF: https://github.com/llvm/llvm-project/commit/c0a1fcd3bf8ead39e8f0290a8a0af1e0367c7cad.diff

LOG: [llvm][IRMover] Remove no-op ptr-to-ptr bitcast (NFC)

Opaque ptr cleanup effort.

Added: 
    

Modified: 
    llvm/lib/Linker/IRMover.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index e335def36647adb..5d8fae28bf40486 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -989,8 +989,7 @@ IRLinker::linkAppendingVarProto(GlobalVariable *DstGV,
   // Replace any uses of the two global variables with uses of the new
   // global.
   if (DstGV) {
-    RAUWWorklist.push_back(
-        std::make_pair(DstGV, ConstantExpr::getBitCast(NG, DstGV->getType())));
+    RAUWWorklist.push_back(std::make_pair(DstGV, NG));
   }
 
   return Ret;


        


More information about the llvm-commits mailing list