We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4d5a76 commit 59da748Copy full SHA for 59da748
llvm/lib/Analysis/ScalarEvolution.cpp
@@ -15665,6 +15665,10 @@ void ScalarEvolution::LoopGuards::collectFromBlock(
15665
15666
Terms.emplace_back(LoopEntryPredicate->getCondition(),
15667
LoopEntryPredicate->getSuccessor(0) == Pair.second);
15668
+
15669
+ // If we are recursively collecting guards stop after 2 predecessors.
15670
+ if (Depth > 0 && Terms.size() == 2)
15671
+ break;
15672
}
15673
// Finally, if we stopped climbing the predecessor chain because
15674
// there wasn't a unique one to continue, try to collect conditions
0 commit comments