[PATCH] D154064: [InstructionSimplify] Limit threadCmpOverPHI recursion depth to 1
Dhruv Chawla via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 02:19:55 PDT 2023
0xdc03 updated this revision to Diff 542387.
0xdc03 added a comment.
- Fix some broken logic
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154064/new/
https://reviews.llvm.org/D154064
Files:
llvm/lib/Analysis/InstructionSimplify.cpp
Index: llvm/lib/Analysis/InstructionSimplify.cpp
===================================================================
--- llvm/lib/Analysis/InstructionSimplify.cpp
+++ llvm/lib/Analysis/InstructionSimplify.cpp
@@ -567,6 +567,9 @@
if (!MaxRecurse--)
return nullptr;
+ // Prevent this function from being recursively called more than once.
+ MaxRecurse = 0;
+
// Make sure the phi is on the LHS.
if (!isa<PHINode>(LHS)) {
std::swap(LHS, RHS);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154064.542387.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/628a224e/attachment.bin>
More information about the llvm-commits
mailing list