arm.c (arm_rtx_costs_1): Add costs for ARMv6 value extension instructions.

2008-03-15  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/arm.c (arm_rtx_costs_1): Add costs for ARMv6 value
	extension instructions.

From-SVN: r133260
This commit is contained in:
Paul Brook 2008-03-15 22:49:44 +00:00 committed by Paul Brook
parent 1b75382832
commit ff06990057
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-03-15 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_rtx_costs_1): Add costs for ARMv6 value
extension instructions.
2008-03-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (ccp_fold): Also read from constant values

View File

@ -4904,6 +4904,12 @@ arm_rtx_costs_1 (rtx x, enum rtx_code code, enum rtx_code outer)
/* Fall through */
case PLUS:
if (arm_arch6 && mode == SImode
&& (GET_CODE (XEXP (x, 0)) == ZERO_EXTEND
|| GET_CODE (XEXP (x, 0)) == SIGN_EXTEND))
return 1 + (GET_CODE (XEXP (XEXP (x, 0), 0)) == MEM ? 10 : 0)
+ (GET_CODE (XEXP (x, 1)) == MEM ? 10 : 0);
if (GET_CODE (XEXP (x, 0)) == MULT)
{
extra_cost = rtx_cost (XEXP (x, 0), code);
@ -5002,12 +5008,17 @@ arm_rtx_costs_1 (rtx x, enum rtx_code code, enum rtx_code outer)
return 4 + (mode == DImode ? 4 : 0);
case SIGN_EXTEND:
/* ??? value extensions are cheaper on armv6. */
if (arm_arch_thumb2 && mode == SImode)
return 1 + (GET_CODE (XEXP (x, 0)) == MEM ? 10 : 0);
if (GET_MODE (XEXP (x, 0)) == QImode)
return (4 + (mode == DImode ? 4 : 0)
+ (GET_CODE (XEXP (x, 0)) == MEM ? 10 : 0));
/* Fall through */
case ZERO_EXTEND:
if (arm_arch6 && mode == SImode)
return 1 + (GET_CODE (XEXP (x, 0)) == MEM ? 10 : 0);
switch (GET_MODE (XEXP (x, 0)))
{
case QImode: