[Patch ARM] Fix address cost.
Richard Earnshaw
rearnsha@arm.com
Thu Jul 30 19:22:00 GMT 2009
On Thu, 2009-07-30 at 17:15 +0100, Ramana Radhakrishnan wrote:
> Hi,
>
> This patch is effectively a 1-bit fix that fixes what was a typo in the
> way address costs were being calculated for PLUS expressions in
> addresses. I've also taken the opportunity to remove the check for MINUS
> because no addresses will be generated with a MINUS expression as that
> is disabled in legitimate_address.
>
> This produced a 1% improvement in performance at -O3 with Coremark on
> Cortex A8. Ok to commit on trunk after testing finishes.?
>
> cheers
> Ramana
>
> 2009-07-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
>
> * config/arm/arm.c (arm_arm_address_cost): Fix typo.
> Remove dead code for MINUS.
>
>
>
> Index: gcc/config/arm/arm.c
> ===================================================================
> --- gcc/config/arm/arm.c (revision 150250)
> +++ gcc/config/arm/arm.c (working copy)
> @@ -6329,9 +6329,9 @@ arm_arm_address_cost (rtx x)
> if (c == MEM || c == LABEL_REF || c == SYMBOL_REF)
> return 10;
>
> - if (c == PLUS || c == MINUS)
> + if (c == PLUS)
> {
> - if (GET_CODE (XEXP (x, 0)) == CONST_INT)
> + if (GET_CODE (XEXP (x, 1)) == CONST_INT)
> return 2;
>
> if (ARITHMETIC_P (XEXP (x, 0)) || ARITHMETIC_P (XEXP (x, 1)))
>
>
OK.
R.
More information about the Gcc-patches
mailing list