mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 03:50:26 +08:00
s390.c (struct processor_costs): Two new fields: madbr, maebr.
2004-12-16 Mark Dettinger <dettinge@de.ibm.com> * config/s390/s390.c (struct processor_costs): Two new fields: madbr, maebr. (s390_rtx_costs): Added handling of multipy and add in SFmode. More precise values for cost of multiply and add. From-SVN: r92259
This commit is contained in:
parent
cacd0a2ccf
commit
b75d6babbc
@ -1,3 +1,10 @@
|
||||
2004-12-16 Mark Dettinger <dettinge@de.ibm.com>
|
||||
|
||||
* config/s390/s390.c (struct processor_costs): Two new fields:
|
||||
madbr, maebr.
|
||||
(s390_rtx_costs): Added handling of multipy and add in SFmode.
|
||||
More precise values for cost of multiply and add.
|
||||
|
||||
2004-12-15 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR target/19028
|
||||
|
@ -105,6 +105,8 @@ struct processor_costs
|
||||
const int mult_df; /* cost of multiplication in DFmode. */
|
||||
const int sqdbr; /* cost of square root in DFmode. */
|
||||
const int sqebr; /* cost of square root in SFmode. */
|
||||
const int madbr; /* cost of multiply and add in DFmode. */
|
||||
const int maebr; /* cost of multiply and add in SFmode. */
|
||||
};
|
||||
|
||||
const struct processor_costs *s390_cost;
|
||||
@ -127,6 +129,8 @@ struct processor_costs z900_cost =
|
||||
COSTS_N_INSNS (7), /* multiplication in DFmode */
|
||||
COSTS_N_INSNS (44), /* SQDBR */
|
||||
COSTS_N_INSNS (35), /* SQEBR */
|
||||
COSTS_N_INSNS (18), /* MADBR */
|
||||
COSTS_N_INSNS (13), /* MAEBR */
|
||||
};
|
||||
|
||||
static const
|
||||
@ -147,6 +151,8 @@ struct processor_costs z990_cost =
|
||||
COSTS_N_INSNS (1), /* multiplication in DFmode */
|
||||
COSTS_N_INSNS (66), /* SQDBR */
|
||||
COSTS_N_INSNS (38), /* SQEBR */
|
||||
COSTS_N_INSNS (1), /* MADBR */
|
||||
COSTS_N_INSNS (1), /* MAEBR */
|
||||
};
|
||||
|
||||
|
||||
@ -1902,13 +1908,16 @@ s390_rtx_costs (rtx x, int code, int outer_code, int *total)
|
||||
case PLUS:
|
||||
case MINUS:
|
||||
/* Check for multiply and add. */
|
||||
if (GET_MODE (x) == DFmode
|
||||
if ((GET_MODE (x) == DFmode || GET_MODE (x) == SFmode)
|
||||
&& GET_CODE (XEXP (x, 0)) == MULT
|
||||
&& TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT && TARGET_FUSED_MADD)
|
||||
{
|
||||
/* This is the multiply and add case. */
|
||||
*total = s390_cost->mult_df
|
||||
+ rtx_cost (XEXP (XEXP (x, 0), 0), MULT)
|
||||
if (GET_MODE (x) == DFmode)
|
||||
*total = s390_cost->madbr;
|
||||
else
|
||||
*total = s390_cost->maebr;
|
||||
*total += rtx_cost (XEXP (XEXP (x, 0), 0), MULT)
|
||||
+ rtx_cost (XEXP (XEXP (x, 0), 1), MULT)
|
||||
+ rtx_cost (XEXP (x, 1), code);
|
||||
return true; /* Do not do an additional recursive descent. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user