[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner sabre at nondot.org
Sun Oct 15 15:42:30 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.518 -> 1.519
---
Log message:

fix a buggy check that accidentally disabled this xform


---
Diffs of the changes:  (+1 -1)

 InstructionCombining.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.518 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.519
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.518	Thu Oct  5 01:55:50 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Sun Oct 15 17:42:15 2006
@@ -1973,7 +1973,7 @@
       // -(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));






More information about the llvm-commits mailing list