From: Roger Sayle Date: Sun, 20 Jun 2004 15:10:34 +0000 (+0000) Subject: i386.c (pentium4_cost): Increase "lea" cost from 1 to 3. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0c003921ff62fde521a14436bbeac899181a7b3;p=gcc.git i386.c (pentium4_cost): Increase "lea" cost from 1 to 3. * config/i386/i386.c (pentium4_cost): Increase "lea" cost from 1 to 3. (ix86_rtx_costs) : Consider ix86_cost->lea even when TARGET_DECOMPOSE_LEA. From-SVN: r83413 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6e81ff99e8..e1bda733447 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-06-20 Roger Sayle + + * config/i386/i386.c (pentium4_cost): Increase "lea" cost from 1 to 3. + (ix86_rtx_costs) : Consider ix86_cost->lea even when + TARGET_DECOMPOSE_LEA. + 2004-06-20 Richard Henderson * c-common.h (add_decl_stmt): Move to cp-tree.h. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1f0cfc85d9d..83dcc9e0ee7 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -417,7 +417,7 @@ struct processor_costs k8_cost = { static const struct processor_costs pentium4_cost = { 1, /* cost of an add instruction */ - 1, /* cost of a lea instruction */ + 3, /* cost of a lea instruction */ 4, /* variable shift costs */ 4, /* constant shift costs */ {15, 15, 15, 15, 15}, /* cost of starting a multiply */ @@ -14904,7 +14904,6 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) return false; } if ((value == 2 || value == 3) - && !TARGET_DECOMPOSE_LEA && ix86_cost->lea <= ix86_cost->shift_const) { *total = COSTS_N_INSNS (ix86_cost->lea); @@ -15007,8 +15006,7 @@ ix86_rtx_costs (rtx x, int code, int outer_code, int *total) case PLUS: if (FLOAT_MODE_P (mode)) *total = COSTS_N_INSNS (ix86_cost->fadd); - else if (!TARGET_DECOMPOSE_LEA - && GET_MODE_CLASS (mode) == MODE_INT + else if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_BITSIZE (mode) <= GET_MODE_BITSIZE (Pmode)) { if (GET_CODE (XEXP (x, 0)) == PLUS