From: Owen Anderson Date: Tue, 23 Dec 2008 00:49:51 +0000 (+0000) Subject: Don't forget to remove phi nodes from the value numbering table after we collapse... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ae53c932b9f3b6046781aeceadc7559bc477f5d4;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index cd2dcf53d40..e5eef8f99e8 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1313,6 +1313,8 @@ bool GVN::processInstruction(Instruction *I, p->replaceAllUsesWith(constVal); if (isa(constVal->getType())) MD->invalidateCachedPointerInfo(constVal); + VN.erase(p); + toErase.push_back(p); } else { localAvail[I->getParent()]->table.insert(std::make_pair(num, I));