diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-12-05 22:41:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-12-05 22:41:53 +0000 |
| commit | c6509f487b0a3eb5576613c67278bca34dfd55e3 (patch) | |
| tree | 482fd4e6d95260f8ff167441cda8c6a599f30315 /llvm/lib/Transforms/Scalar | |
| parent | b20bdd2ba157feb2ce0642f9ae25b495a253274c (diff) | |
| download | bcm5719-llvm-c6509f487b0a3eb5576613c67278bca34dfd55e3.tar.gz bcm5719-llvm-c6509f487b0a3eb5576613c67278bca34dfd55e3.zip | |
Fix bug: 2002-12-05-MissedConstProp.ll pointed out by Casey Carter
llvm-svn: 4935
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index f57d8b1c36b..cdc1e3b1b0f 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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)) { |

