summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-15 22:42:15 +0000
committerChris Lattner <sabre@nondot.org>2006-10-15 22:42:15 +0000
commit9a1c7dd27ab14725beb4c4f2810124cd561cc99d (patch)
tree6307c1515dabddcc5a6755a4c6ec60658a34662c /llvm/lib/Transforms
parentc1fb4264f5d8890c400f8ac0de369dc1405cbe53 (diff)
downloadbcm5719-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.cpp2
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));
OpenPOWER on IntegriCloud