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 | d5b8d92b9f4dfb216e4f2a52b4e801d7559574ba (patch) | |
tree | 7a6633e80c0abb5f0901053c9771b8bd04526c39 /lib | |
parent | 0ab5a4ae552765069baf4a45fcc26dba817020f9 (diff) | |
download | external_llvm-d5b8d92b9f4dfb216e4f2a52b4e801d7559574ba.zip external_llvm-d5b8d92b9f4dfb216e4f2a52b4e801d7559574ba.tar.gz external_llvm-d5b8d92b9f4dfb216e4f2a52b4e801d7559574ba.tar.bz2 |
simplify some code, BreakUpSubtract always returns nonnull now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/Reassociate.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 3e2d38f..47c767f 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/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. |