This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][AArch64] Properly handle SHIFT ops and EXTEND in aarch64_rtx_mult_cost


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]