Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey Carter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4935 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-12-05 22:41:53 +00:00
parent c41ab22492
commit c736d56562

View File

@ -792,7 +792,8 @@ bool InstCombiner::runOnFunction(Function &F) {
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
if (Instruction *Op = dyn_cast<Instruction>(I->getOperand(i)))
WorkList.push_back(Op);
I->replaceAllUsesWith(C);
ReplaceInstUsesWith(*I, C);
++NumConstProp;
BasicBlock::iterator BBI = I;
if (dceInstruction(BBI)) {