[llvm] Globalopt pass produces invalid debug info (PR #100654)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 08:07:01 PDT 2024


================
@@ -1338,6 +1338,7 @@ deleteIfDead(GlobalValue &GV,
     if (DeleteFnCallback)
       DeleteFnCallback(*F);
   }
+  ReplaceableMetadataImpl::SalvageDebugInfo(GV);
----------------
ykhatav wrote:

The loop responsible for removing dead users and potentially calling constantIsDead() does not execute in this case. It looks like both the iterators I and E are null indicating it does not count debug intrinsic as users.

https://github.com/llvm/llvm-project/pull/100654


More information about the llvm-commits mailing list