[llvm] [GVN] Improve processBlock for instruction erasure (PR #131753)

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 00:59:53 PDT 2025


================
@@ -2206,13 +2210,13 @@ bool GVNPass::processLoad(LoadInst *L) {
   // MaterializeAdjustedValue is responsible for combining metadata.
   ICF->removeUsersOf(L);
   L->replaceAllUsesWith(AvailableValue);
-  markInstructionForDeletion(L);
   if (MSSAU)
     MSSAU->removeMemoryAccess(L);
   ++NumGVNLoad;
   reportLoadElim(L, AvailableValue, ORE);
   // Tell MDA to reexamine the reused pointer since we might have more
   // information after forwarding it.
+  doInstructionDeletion(L);
----------------
madhur13490 wrote:

Done

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


More information about the llvm-commits mailing list