diff options
author | Chris Lattner <sabre@nondot.org> | 2005-02-01 00:18:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-02-01 00:18:30 +0000 |
commit | caa7c19fb4ca60e21dc8fa9b10c736a05a9f9c22 (patch) | |
tree | 2e744e39c01c613a0d843e995b87b9bd42c6a8ac /lib/Analysis/ScalarEvolution.cpp | |
parent | 41ce39cbd7ff58840a1df669132173d0b7add7f4 (diff) |
Fix a problem where we could infinitely recurse on phi nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index ad08489cdb..d400b4b3fd 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1163,7 +1163,7 @@ void ScalarEvolutionsImpl::UpdatePHIUserScalarEntries(Instruction *I, std::set<Instruction*> &UpdatedInsts) { std::map<Value*, SCEVHandle>::iterator SI = Scalars.find(I); if (SI == Scalars.end()) return; // This scalar wasn't previous processed. - if (UpdatedInsts.insert(I).second) { + if (UpdatedInsts.insert(I).second && !isa<PHINode>(PN)) { Scalars.erase(SI); // Remove the old entry getSCEV(I); // Calculate the new entry |