aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-05 22:41:53 +0000
committerChris Lattner <sabre@nondot.org>2002-12-05 22:41:53 +0000
commitc736d56562af898f3a7bc1c202bd40dd1b952bf6 (patch)
treec5f9207899e3a3317d7236009cf6eadcf90f55a0
parentc41ab224927f9cc2c09291459886de21be68c567 (diff)
downloadexternal_llvm-c736d56562af898f3a7bc1c202bd40dd1b952bf6.zip
external_llvm-c736d56562af898f3a7bc1c202bd40dd1b952bf6.tar.gz
external_llvm-c736d56562af898f3a7bc1c202bd40dd1b952bf6.tar.bz2
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
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index f57d8b1..cdc1e3b 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/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)) {