OSDN Git Service

[NewGVN] Get rid of an assertion.
authorDavide Italiano <davide@freebsd.org>
Sat, 20 May 2017 00:24:04 +0000 (00:24 +0000)
committerDavide Italiano <davide@freebsd.org>
Sat, 20 May 2017 00:24:04 +0000 (00:24 +0000)
This was here because we don't want to switch leaders too much,
in order to avoid fixpoint(ing) issue, but it's not sure if it
matters in practice.

A first step towards fixing PR32897.

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

lib/Transforms/Scalar/NewGVN.cpp

index 9059fc7..917872d 100644 (file)
@@ -2109,7 +2109,6 @@ void NewGVN::moveValueToNewCongruenceClass(Instruction *I, const Expression *E,
       // If it's a store expression we are using, it means we are not equivalent
       // to something earlier.
       if (auto *SE = dyn_cast<StoreExpression>(E)) {
-        assert(SE->getStoredValue() != NewClass->getLeader());
         NewClass->setStoredValue(SE->getStoredValue());
         markValueLeaderChangeTouched(NewClass);
         // Shift the new class leader to be the store