Don't forget to remove phi nodes from the value numbering table after we collapse them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61358 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2008-12-23 00:49:51 +00:00
parent 15a3a49e19
commit ae53c932b9

View File

@ -1313,6 +1313,8 @@ bool GVN::processInstruction(Instruction *I,
p->replaceAllUsesWith(constVal);
if (isa<PointerType>(constVal->getType()))
MD->invalidateCachedPointerInfo(constVal);
VN.erase(p);
toErase.push_back(p);
} else {
localAvail[I->getParent()]->table.insert(std::make_pair(num, I));