1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Fix a problem where we could infinitely recurse on phi nodes.

llvm-svn: 19955
This commit is contained in:
Chris Lattner 2005-02-01 00:18:30 +00:00
parent 1e8e58b829
commit d9b3839cec

View File

@ -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