[PATCH] D141988: [llvm] Fix bug in DemoteRegToStack where DenseMap is not used

riChar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 23:15:45 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4e7b998d8b16: [IR] Fix bug in DemoteRegToStack where DenseMap is not used (authored by ri-char).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141988/new/

https://reviews.llvm.org/D141988

Files:
  llvm/lib/Transforms/Utils/DemoteRegToStack.cpp


Index: llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
===================================================================
--- llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
+++ llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
@@ -74,6 +74,7 @@
             V = new LoadInst(I.getType(), Slot, I.getName() + ".reload",
                              VolatileLoads,
                              PN->getIncomingBlock(i)->getTerminator());
+            Loads[PN->getIncomingBlock(i)] = V;
           }
           PN->setIncomingValue(i, V);
         }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141988.495389.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230207/63b461f8/attachment.bin>


More information about the llvm-commits mailing list