Be sure to remove values from the value numbering table after we delete them.
authorOwen Anderson <resistor@mac.com>
Thu, 19 Jun 2008 17:53:26 +0000 (17:53 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 19 Jun 2008 17:53:26 +0000 (17:53 +0000)
This fixes a failure on povray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52499 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GVN.cpp

index c9eb24743280528e4fb6f18c383c8a315d5ec35f..f8522694286957747cd5a816915211430003fd30 100644 (file)
@@ -1234,6 +1234,7 @@ bool GVN::performPRE(Function& F) {
               UUI->second = Phi;
       
       BI->replaceAllUsesWith(Phi);
+      VN.erase(BI);
       
       Instruction* erase = BI;
       BI++;