From: Chris Lattner Date: Tue, 1 Feb 2005 00:18:30 +0000 (+0000) Subject: Fix a problem where we could infinitely recurse on phi nodes. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=caa7c19fb4ca60e21dc8fa9b10c736a05a9f9c22;p=oota-llvm.git 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 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index ad08489cdb3..d400b4b3fd8 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1163,7 +1163,7 @@ void ScalarEvolutionsImpl::UpdatePHIUserScalarEntries(Instruction *I, std::set &UpdatedInsts) { std::map::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(PN)) { Scalars.erase(SI); // Remove the old entry getSCEV(I); // Calculate the new entry