Commit 5b437e0f by Richard Earnshaw Committed by Richard Earnshaw

cse.c (fold_rtx): Calculate the old cost before we fold each operand.

* cse.c (fold_rtx): Calculate the old cost before we fold each
operand.

From-SVN: r57394
parent 51270f0a
2002-09-21 Richard Earnshaw <rearnsha@arm.com>
* cse.c (fold_rtx): Calculate the old cost before we fold each
operand.
2002-09-21 Richard Henderson <rth@redhat.com>
* c-common.c (cpp_define_data_format): Remove __GCC_LITTLE_ENDIAN__,
......@@ -3732,6 +3732,7 @@ fold_rtx (x, insn)
rtx cheap_arg, expensive_arg;
rtx replacements[2];
int j;
int old_cost = COST_IN (XEXP (x, i), code);
/* Most arguments are cheap, so handle them specially. */
switch (GET_CODE (arg))
......@@ -3822,7 +3823,6 @@ fold_rtx (x, insn)
for (j = 0; j < 2 && replacements[j]; j++)
{
int old_cost = COST_IN (XEXP (x, i), code);
int new_cost = COST_IN (replacements[j], code);
/* Stop if what existed before was cheaper. Prefer constants
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment