diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-06-20 15:10:34 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-06-20 15:10:34 +0000 |
commit | e0c003921ff62fde521a14436bbeac899181a7b3 (patch) | |
tree | 656ceab6687e65dd8b94a6dda37257ce017a376b | |
parent | ce70456bd6bebd23787157dd3f0cc65eb4ad381d (diff) | |
download | gcc-e0c003921ff62fde521a14436bbeac899181a7b3.zip gcc-e0c003921ff62fde521a14436bbeac899181a7b3.tar.gz gcc-e0c003921ff62fde521a14436bbeac899181a7b3.tar.bz2 |
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) <ASHIFT, PLUS>: Consider ix86_cost->lea even when
TARGET_DECOMPOSE_LEA.
From-SVN: r83413
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6e81ff..e1bda73 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-06-20 Roger Sayle <roger@eyesopen.com> + + * config/i386/i386.c (pentium4_cost): Increase "lea" cost from 1 to 3. + (ix86_rtx_costs) <ASHIFT, PLUS>: Consider ix86_cost->lea even when + TARGET_DECOMPOSE_LEA. + 2004-06-20 Richard Henderson <rth@redhat.com> * 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 1f0cfc8..83dcc9e 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 |