This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] Fix costing of sign-extending load in rtx costs
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Thu, 19 May 2016 14:51:19 +0100
- Subject: Re: [PATCH][ARM] Fix costing of sign-extending load in rtx costs
- Authentication-results: sourceware.org; auth=none
- References: <5720C906 dot 6060007 at foss dot arm dot com>
On 27/04/16 15:13, Kyrill Tkachov wrote:
> Hi all,
>
> Another costs issue that came out of the investigation for PR 65932 is that
> sign-extending loads get a higher cost than they should in the arm backend.
> The problem is that when handling a sign-extend of a MEM we add the cost
> of the load_sign_extend cost field and then recursively add the cost of the inner MEM
> rtx, which is bogus. This will end up adding an extra load cost on it.
>
> The solution in this patch is to just remove that recursive step.
> With this patch from various CSE dumps I see much more sane costs assign to these
> expressions (such as 12 instead of 32 or higher).
>
> Bootstrapped and tested on arm-none-linux-gnueabihf.
>
> Ok for trunk?
>
> Thanks,
> Kyrill
>
> 2016-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/arm/arm.c (arm_new_rtx_costs, SIGN_EXTEND case):
> Don't add cost of inner memory when handling sign-extended
> loads.
Ok ... it took me a while to work out that this was sane.
regards
Ramana