[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:01:58 PST 2023
ri-char created this revision.
ri-char added reviewers: ahatanak, mehdi_amini.
Herald added a subscriber: hiraditya.
Herald added a project: All.
ri-char requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`Loads` is used to keep track of and reuse load instructions we insert, but these value are inserted into `Loads`.
Repository:
rG LLVM Github Monorepo
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.490031.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230118/8345bae8/attachment.bin>
More information about the llvm-commits
mailing list