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

riChar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 22:04:49 PST 2023


ri-char updated this revision to Diff 490037.

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.490037.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230118/662340c1/attachment.bin>


More information about the llvm-commits mailing list