mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
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:
@ -792,7 +792,8 @@ bool InstCombiner::runOnFunction(Function &F) {
|
|||||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
|
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
|
||||||
if (Instruction *Op = dyn_cast<Instruction>(I->getOperand(i)))
|
if (Instruction *Op = dyn_cast<Instruction>(I->getOperand(i)))
|
||||||
WorkList.push_back(Op);
|
WorkList.push_back(Op);
|
||||||
I->replaceAllUsesWith(C);
|
ReplaceInstUsesWith(*I, C);
|
||||||
|
|
||||||
++NumConstProp;
|
++NumConstProp;
|
||||||
BasicBlock::iterator BBI = I;
|
BasicBlock::iterator BBI = I;
|
||||||
if (dceInstruction(BBI)) {
|
if (dceInstruction(BBI)) {
|
||||||
|
Reference in New Issue
Block a user