rs6000.c (rs6000_rtx_costs): Indicate that the rs6000 doesn't have shift-and-add or shift-and-sub...
* config/rs6000/rs6000.c (rs6000_rtx_costs): Indicate that the rs6000 doesn't have shift-and-add or shift-and-sub instructions by returning the cost of a multiplication plus an addition. From-SVN: r84556
This commit is contained in:
parent
62e39334a0
commit
938bf7475d
|
@ -1,3 +1,9 @@
|
||||||
|
2004-07-12 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
|
* config/rs6000/rs6000.c (rs6000_rtx_costs): Indicate that the
|
||||||
|
rs6000 doesn't have shift-and-add or shift-and-sub instructions
|
||||||
|
by returning the cost of a multiplication plus an addition.
|
||||||
|
|
||||||
2004-07-12 Paolo Bonzini <bonzini@gnu.org>
|
2004-07-12 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
PR tree-optimization/14107
|
PR tree-optimization/14107
|
||||||
|
|
|
@ -16535,6 +16535,12 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
|
||||||
: rs6000_cost->fp;
|
: rs6000_cost->fp;
|
||||||
else if (mode == SFmode)
|
else if (mode == SFmode)
|
||||||
*total = rs6000_cost->fp;
|
*total = rs6000_cost->fp;
|
||||||
|
else if (GET_CODE (XEXP (x, 0)) == MULT)
|
||||||
|
{
|
||||||
|
/* The rs6000 doesn't have shift-and-add instructions. */
|
||||||
|
rs6000_rtx_costs (XEXP (x, 0), MULT, PLUS, total);
|
||||||
|
*total += COSTS_N_INSNS (1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
*total = ((GET_CODE (XEXP (x, 1)) == CONST_INT
|
*total = ((GET_CODE (XEXP (x, 1)) == CONST_INT
|
||||||
&& ((unsigned HOST_WIDE_INT) (INTVAL (XEXP (x, 1))
|
&& ((unsigned HOST_WIDE_INT) (INTVAL (XEXP (x, 1))
|
||||||
|
@ -16551,6 +16557,12 @@ rs6000_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED,
|
||||||
: rs6000_cost->fp;
|
: rs6000_cost->fp;
|
||||||
else if (mode == SFmode)
|
else if (mode == SFmode)
|
||||||
*total = rs6000_cost->fp;
|
*total = rs6000_cost->fp;
|
||||||
|
else if (GET_CODE (XEXP (x, 0)) == MULT)
|
||||||
|
{
|
||||||
|
/* The rs6000 doesn't have shift-and-sub instructions. */
|
||||||
|
rs6000_rtx_costs (XEXP (x, 0), MULT, MINUS, total);
|
||||||
|
*total += COSTS_N_INSNS (1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
*total = COSTS_N_INSNS (1);
|
*total = COSTS_N_INSNS (1);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue