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 | 1230cf25bafa057498cfbf1e6186f841b8f67ebb (patch) | |
| tree | b34f239d3b3ad713be6c3e2672c93476d7c584d4 /llvm/lib/Analysis/ScalarEvolution.cpp | |
| parent | 8dfa2e4465239a95d8939d6481f71736e3de1b1e (diff) | |
| download | bcm5719-llvm-1230cf25bafa057498cfbf1e6186f841b8f67ebb.tar.gz bcm5719-llvm-1230cf25bafa057498cfbf1e6186f841b8f67ebb.zip | |
Fix a problem where we could infinitely recurse on phi nodes.
llvm-svn: 19955
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index ad08489cdb3..d400b4b3fd8 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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 |

