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 | 02c0e3659fb055dd23f33e3aa5b2793798ccb66f (patch) | |
tree | 6641360dae5fc8921ff04a99d3df8d1ece81071b | |
parent | 32b5d717ce1d91f93aa69eaff812dcc8affe3a09 (diff) |
fix a buggy check that accidentally disabled this xform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30967 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 739493e274..6654daff37 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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)); |