diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-02-18 02:18:25 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-02-18 02:18:25 +0000 |
| commit | 0e7fd2f1a84b2379a3b1df714fcc4d859de1a8da (patch) | |
| tree | a8083145dc64dbed53959afb1f7b6e1850aafe5e /llvm/lib/Transforms/Scalar/Reassociate.cpp | |
| parent | 8432cc662f12867d0d7995509006d6d0ea994124 (diff) | |
| download | bcm5719-llvm-0e7fd2f1a84b2379a3b1df714fcc4d859de1a8da.tar.gz bcm5719-llvm-0e7fd2f1a84b2379a3b1df714fcc4d859de1a8da.zip | |
simplify some code, BreakUpSubtract always returns nonnull now.
llvm-svn: 47251
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/Reassociate.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index 3e2d38f76ba..47c767feb63 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -779,10 +779,8 @@ void Reassociate::ReassociateBB(BasicBlock *BB) { // 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. |

