From d5e0534e64b525e8dca8e2fa05455011031c643a Mon Sep 17 00:00:00 2001 From: bstarynk Date: Mon, 1 Sep 2008 07:29:23 +0000 Subject: 2008-09-01 Basile Starynkevitch 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 --- gcc/expr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/expr.c') 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); -- cgit v1.2.1