simplify some code, BreakUpSubtract always returns nonnull now.
llvm-svn: 47251
This commit is contained in:
parent
8432cc662f
commit
0e7fd2f1a8
|
@ -779,10 +779,8 @@ void Reassociate::ReassociateBB(BasicBlock *BB) {
|
||||||
// see if we can convert it to X+-Y.
|
// see if we can convert it to X+-Y.
|
||||||
if (BI->getOpcode() == Instruction::Sub) {
|
if (BI->getOpcode() == Instruction::Sub) {
|
||||||
if (ShouldBreakUpSubtract(BI)) {
|
if (ShouldBreakUpSubtract(BI)) {
|
||||||
if (Instruction *NI = BreakUpSubtract(BI)) {
|
BI = BreakUpSubtract(BI);
|
||||||
MadeChange = true;
|
MadeChange = true;
|
||||||
BI = NI;
|
|
||||||
}
|
|
||||||
} else if (BinaryOperator::isNeg(BI)) {
|
} else if (BinaryOperator::isNeg(BI)) {
|
||||||
// Otherwise, this is a negation. See if the operand is a multiply tree
|
// 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.
|
// and if this is not an inner node of a multiply tree.
|
||||||
|
|
Loading…
Reference in New Issue