This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Properly handle SHIFT ops and EXTEND in aarch64_rtx_mult_cost
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, James Greenhalgh <james dot greenhalgh at arm dot com>
- Date: Thu, 30 Apr 2015 13:13:26 +0100
- Subject: Re: [PATCH][AArch64] Properly handle SHIFT ops and EXTEND in aarch64_rtx_mult_cost
- Authentication-results: sourceware.org; auth=none
- References: <55352AD9 dot 1030408 at arm dot com>
On 20 April 2015 at 17:35, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> Hi all,
>
> The aarch64_rtx_mult_cost helper is supposed to handle multiplication costs
> as well as
> PLUS/MINUS operations combined with multiplication or shift operations. The
> shift
> operations may contain an extension. Currently we do not handle all these
> cases properly.
> We also don't handle other supported shift types besides ASHIFT.
>
> This patch addresses that by beefing up aarch64_rtx_mult_cost to handle
> extensions inside the shifts and handling the other kinds of supported
> shifts.
>
> Bootstrapped and tested on aarch64-linux.
>
> Ok for trunk?
>
> Thanks,
> Kyrill
>
> 2015-04-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/aarch64/aarch64.c (aarch64_shift_p): New function.
> (aarch64_rtx_mult_cost): Update comment to reflect that it also handles
> combined arithmetic-shift ops. Properly handle all shift and extend
> operations that can occur in combination with PLUS/MINUS.
> Rename maybe_fma to compound_p.
> (aarch64_rtx_costs): Use aarch64_shift_p when costing compound
> arithmetic and shift operations.
+/* Return true iff CODE is a shift supported in combination
+ with arithmetic instructions. */
+static bool
+aarch64_shift_p (enum rtx_code code)
OK, but add the blank line between the function comment and the
function please. /Marcus