diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-29 16:20:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-29 16:20:25 +0000 |
commit | 8b054c0eb96f250b6cebe26cc13bf880d8f44cc2 (patch) | |
tree | 7a6775a13c57888e2bef5e5549ca2bcda62d3a47 /lib/Transforms/Scalar/GCSE.cpp | |
parent | 96c466b06ab0c830b07329c1b16037f585ccbe40 (diff) | |
download | external_llvm-8b054c0eb96f250b6cebe26cc13bf880d8f44cc2.zip external_llvm-8b054c0eb96f250b6cebe26cc13bf880d8f44cc2.tar.gz external_llvm-8b054c0eb96f250b6cebe26cc13bf880d8f44cc2.tar.bz2 |
Remove broken assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GCSE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/GCSE.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index cb24a0c..2676609 100644 --- a/lib/Transforms/Scalar/GCSE.cpp +++ b/lib/Transforms/Scalar/GCSE.cpp @@ -105,6 +105,8 @@ bool GCSE::runOnFunction(Function *F) { // void GCSE::ReplaceInstWithInst(Instruction *First, BasicBlock::iterator SI) { Instruction *Second = *SI; + + //cerr << "DEL " << (void*)Second << Second; // Add the first instruction back to the worklist WorkList.insert(First); @@ -127,9 +129,9 @@ void GCSE::ReplaceInstWithInst(Instruction *First, BasicBlock::iterator SI) { // void GCSE::CommonSubExpressionFound(Instruction *I, Instruction *Other) { // I has already been removed from the worklist, Other needs to be. - assert(WorkList.count(I) == 0 && WorkList.count(Other) && - "I in worklist or Other not!"); - WorkList.erase(Other); + assert(I != Other && WorkList.count(I) == 0 && "I shouldn't be on worklist!"); + + WorkList.erase(Other); // Other may not actually be on the worklist anymore... // Handle the easy case, where both instructions are in the same basic block BasicBlock *BB1 = I->getParent(), *BB2 = Other->getParent(); |