Author: lattner
Date: Sun Feb 17 20:18:25 2008
New Revision: 47251

URL: http://llvm.org/viewvc/llvm-project?rev=47251&view=rev
Log:
simplify some code, BreakUpSubtract always returns nonnull now.

Modified:
    llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=47251&r1=47250&r2=47251&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Sun Feb 17 20:18:25 2008
@@ -779,10 +779,8 @@
     // see if we can convert it to X+-Y.
     if (BI->getOpcode() == Instruction::Sub) {
       if (ShouldBreakUpSubtract(BI)) {
-        if (Instruction *NI = BreakUpSubtract(BI)) {
-          MadeChange = true;
-          BI = NI;
-        }
+        BI = BreakUpSubtract(BI);
+        MadeChange = true;
       } else if (BinaryOperator::isNeg(BI)) {
         // Otherwise, this is a negation.  See if the operand is a multiply 
tree
         // and if this is not an inner node of a multiply tree.


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to