OSDN Git Service

* config/i386/i386.c (pentium4_cost): Increase "lea" cost from 1 to 3.
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Jun 2004 15:10:34 +0000 (15:10 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Jun 2004 15:10:34 +0000 (15:10 +0000)
(ix86_rtx_costs) <ASHIFT, PLUS>: Consider ix86_cost->lea even when
TARGET_DECOMPOSE_LEA.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83413 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c

index b6e81ff..e1bda73 100644 (file)
@@ -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.
index 1f0cfc8..83dcc9e 100644 (file)
@@ -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