diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-10-15 22:42:15 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-10-15 22:42:15 +0000 |
| commit | 9a1c7dd27ab14725beb4c4f2810124cd561cc99d (patch) | |
| tree | 6307c1515dabddcc5a6755a4c6ec60658a34662c /llvm/lib/Transforms | |
| parent | c1fb4264f5d8890c400f8ac0de369dc1405cbe53 (diff) | |
| download | bcm5719-llvm-9a1c7dd27ab14725beb4c4f2810124cd561cc99d.tar.gz bcm5719-llvm-9a1c7dd27ab14725beb4c4f2810124cd561cc99d.zip | |
fix a buggy check that accidentally disabled this xform
llvm-svn: 30967
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 739493e2740..6654daff37d 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -1973,7 +1973,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) { // -(X sdiv C) -> (X sdiv -C) if (Op1I->getOpcode() == Instruction::Div) if (ConstantSInt *CSI = dyn_cast<ConstantSInt>(Op0)) - if (CSI->isNullValue()) + if (!CSI->isNullValue()) if (Constant *DivRHS = dyn_cast<Constant>(Op1I->getOperand(1))) return BinaryOperator::createDiv(Op1I->getOperand(0), ConstantExpr::getNeg(DivRHS)); |

