From 9a1c7dd27ab14725beb4c4f2810124cd561cc99d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 15 Oct 2006 22:42:15 +0000 Subject: fix a buggy check that accidentally disabled this xform llvm-svn: 30967 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib') 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(Op0)) - if (CSI->isNullValue()) + if (!CSI->isNullValue()) if (Constant *DivRHS = dyn_cast(Op1I->getOperand(1))) return BinaryOperator::createDiv(Op1I->getOperand(0), ConstantExpr::getNeg(DivRHS)); -- cgit v1.2.3