verify limits-fndefn.c from the GCC testsuite before the
authorChris Lattner <sabre@nondot.org>
Fri, 18 Jul 2008 05:23:39 +0000 (05:23 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 18 Jul 2008 05:23:39 +0000 (05:23 +0000)
heat death of the universe, fixing an O(N^2) problem in the
size of a basic block.

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

lib/VMCore/Verifier.cpp

index 4ff2447621e158979e934c7801e55e0b7395065e..79c24f334cfdbf85cd8a4a356ce2b5f6ca31ebf8 100644 (file)
@@ -1239,7 +1239,7 @@ void Verifier::visitInstruction(Instruction &I) {
         }
 
         // Definition must dominate use unless use is unreachable!
-        Assert2(DT->dominates(Op, &I) ||
+        Assert2(InstsInThisBlock.count(Op) || DT->dominates(Op, &I) ||
                 !DT->dominates(&BB->getParent()->getEntryBlock(), BB),
                 "Instruction does not dominate all uses!", Op, &I);
       } else {