diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-01 07:29:23 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-01 07:29:23 +0000 |
commit | d5e0534e64b525e8dca8e2fa05455011031c643a (patch) | |
tree | 61d274e19b123144c2895546960a996641555928 /gcc/expr.c | |
parent | a30fe044170c44da9e441535e2167ca8e885b3cb (diff) | |
download | gcc-d5e0534e64b525e8dca8e2fa05455011031c643a.tar.gz |
2008-09-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r139848
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@139851 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 908d5641953..07685b22899 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3458,13 +3458,14 @@ compress_float_constant (rtx x, rtx y) enum machine_mode srcmode; REAL_VALUE_TYPE r; int oldcost, newcost; + bool speed = optimize_insn_for_speed_p (); REAL_VALUE_FROM_CONST_DOUBLE (r, y); if (LEGITIMATE_CONSTANT_P (y)) - oldcost = rtx_cost (y, SET); + oldcost = rtx_cost (y, SET, speed); else - oldcost = rtx_cost (force_const_mem (dstmode, y), SET); + oldcost = rtx_cost (force_const_mem (dstmode, y), SET, speed); for (srcmode = GET_CLASS_NARROWEST_MODE (GET_MODE_CLASS (orig_srcmode)); srcmode != orig_srcmode; @@ -3491,7 +3492,7 @@ compress_float_constant (rtx x, rtx y) if (! (*insn_data[ic].operand[1].predicate) (trunc_y, srcmode)) continue; /* This is valid, but may not be cheaper than the original. */ - newcost = rtx_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), SET); + newcost = rtx_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), SET, speed); if (oldcost < newcost) continue; } @@ -3499,7 +3500,7 @@ compress_float_constant (rtx x, rtx y) { trunc_y = force_const_mem (srcmode, trunc_y); /* This is valid, but may not be cheaper than the original. */ - newcost = rtx_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), SET); + newcost = rtx_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), SET, speed); if (oldcost < newcost) continue; trunc_y = validize_mem (trunc_y); |