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