1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Suppress an unused variable warning when assertions are off;

remove some trailing whitespace while there.

llvm-svn: 93008
This commit is contained in:
Duncan Sands 2010-01-08 17:51:48 +00:00
parent 725b9ba4e5
commit c94f8aeb36

View File

@ -801,14 +801,15 @@ Value *Reassociate::OptimizeAdd(Instruction *I,
// No need for extra uses anymore.
delete DummyInst;
unsigned NumAddedValues = NewMulOps.size();
Value *V = EmitAddTreeOfValues(I, NewMulOps);
// Now that we have inserted the add tree, optimize it. This allows us to
// handle cases that require multiple factoring steps, such as this:
// A*A*B + A*A*C --> A*(A*B+A*C) --> A*(A*(B+C))
assert(NumAddedValues > 1 && "Each occurrence should contribute a value");
(void)NumAddedValues;
V = ReassociateExpression(cast<BinaryOperator>(V));
// Create the multiply.