public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: Richard Sandiford <richard.sandiford@linaro.org>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Richard Earnshaw	<Richard.Earnshaw@arm.com>,
	Marcus Shawcroft <Marcus.Shawcroft@arm.com>,	<nd@arm.com>
Subject: Re: PING: [11/nn] [AArch64] Set NUM_POLY_INT_COEFFS to 2
Date: Sat, 06 Jan 2018 17:57:00 -0000	[thread overview]
Message-ID: <20180106175722.GA15090@arm.com> (raw)
In-Reply-To: <87wp0wlf5o.fsf_-_@linaro.org>

On Fri, Jan 05, 2018 at 11:26:59AM +0000, Richard Sandiford wrote:
> Ping.  Here's the patch updated to apply on top of the v8.4 and
> __builtin_load_no_speculate support.
> 
> Richard Sandiford <richard.sandiford@linaro.org> writes:
> > This patch switches the AArch64 port to use 2 poly_int coefficients
> > and updates code as necessary to keep it compiling.
> >
> > One potentially-significant change is to
> > aarch64_hard_regno_caller_save_mode.  The old implementation
> > was written in a pretty conservative way: it changed the default
> > behaviour for single-register values, but used the default handling
> > for multi-register values.
> >
> > I don't think that's necessary, since the interesting cases for this
> > macro are usually the single-register ones.  Multi-register modes take
> > up the whole of the constituent registers and the move patterns for all
> > multi-register modes should be equally good.
> >
> > Using the original mode for multi-register cases stops us from using
> > SVE modes to spill multi-register NEON values.  This was caught by
> > gcc.c-torture/execute/pr47538.c.
> >
> > Also, aarch64_shift_truncation_mask used GET_MODE_BITSIZE - 1.
> > GET_MODE_UNIT_BITSIZE - 1 is equivalent for the cases that it handles
> > (which are all scalars), and I think it's more obvious, since if we ever
> > do use this for elementwise shifts of vector modes, the mask will depend
> > on the number of bits in each element rather than the number of bits in
> > the whole vector.

This is OK for trunk, with whatever modifications are needed to make the
rebase work. I do have one question and one minor comment; you can assume
that if you do make modifications in response to these that the patch is
still OK.

> Index: gcc/config/aarch64/aarch64.c
> ===================================================================
> --- gcc/config/aarch64/aarch64.c	2018-01-05 11:24:44.647408566 +0000
> +++ gcc/config/aarch64/aarch64.c	2018-01-05 11:24:44.867399574 +0000
> @@ -2262,8 +2258,12 @@ aarch64_pass_by_reference (cumulative_ar
>    int nregs;
>  
>    /* GET_MODE_SIZE (BLKmode) is useless since it is 0.  */
> -  size = (mode == BLKmode && type)
> -    ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
> +  if (mode == BLKmode && type)
> +    size = int_size_in_bytes (type);
> +  else
> +    /* No frontends can create types with variable-sized modes, so we
> +       shouldn't be asked to pass or return them.  */
> +    size = GET_MODE_SIZE (mode).to_constant ();

I presume that the assertion in your comment is checked in the
GET_MODE_SIZE (mode).to_constant (); call? If not, is it worth making the
assert explicit here?

> @@ -11874,8 +11921,9 @@ aarch64_simd_valid_immediate (rtx op, si
>    unsigned int n_elts;
>    if (const_vec_duplicate_p (op, &elt))
>      n_elts = 1;
> -  else if (GET_CODE (op) == CONST_VECTOR)
> -    n_elts = CONST_VECTOR_NUNITS (op);
> +  else if (GET_CODE (op) == CONST_VECTOR
> +	   && CONST_VECTOR_NUNITS (op).is_constant (&n_elts))
> +    ;
>    else
>      return false;
>  

A comment in the empty else if case would be useful for clarity.

Thanks,
James

  reply	other threads:[~2018-01-06 17:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 13:22 [00/nn] AArch64 patches preparing for SVE Richard Sandiford
2017-10-27 13:23 ` [01/nn] [AArch64] Generate permute patterns using rtx builders Richard Sandiford
2017-10-31 18:02   ` James Greenhalgh
2017-11-02  9:03     ` Richard Sandiford
2017-10-27 13:25 ` [02/nn] [AArch64] Move code around Richard Sandiford
2017-10-31 18:03   ` James Greenhalgh
2017-10-27 13:26 ` [03/nn] [AArch64] Rework interface to add constant/offset routines Richard Sandiford
2017-10-30 11:03   ` Richard Sandiford
2017-11-10 15:43     ` James Greenhalgh
2017-10-27 13:27 ` [04/nn] [AArch64] Rename the internal "Upl" constraint Richard Sandiford
2017-10-31 18:04   ` James Greenhalgh
2017-10-27 13:28 ` [05/nn] [AArch64] Rewrite aarch64_simd_valid_immediate Richard Sandiford
2017-11-10 11:20   ` James Greenhalgh
2017-10-27 13:28 ` [06/nn] [AArch64] Add an endian_lane_rtx helper routine Richard Sandiford
2017-11-02  9:55   ` James Greenhalgh
2017-10-27 13:29 ` [07/nn] [AArch64] Pass number of units to aarch64_reverse_mask Richard Sandiford
2017-11-02  9:56   ` James Greenhalgh
2017-10-27 13:29 ` [08/nn] [AArch64] Pass number of units to aarch64_simd_vect_par_cnst_half Richard Sandiford
2017-11-02  9:59   ` James Greenhalgh
2017-10-27 13:30 ` [09/nn] [AArch64] Pass number of units to aarch64_expand_vec_perm(_const) Richard Sandiford
2017-11-02 10:00   ` James Greenhalgh
2017-10-27 13:31 ` [11/nn] [AArch64] Set NUM_POLY_INT_COEFFS to 2 Richard Sandiford
2018-01-05 11:27   ` PING: " Richard Sandiford
2018-01-06 17:57     ` James Greenhalgh [this message]
2018-01-06 19:03       ` Richard Sandiford
2017-10-27 13:31 ` [10/nn] [AArch64] Minor rtx costs tweak Richard Sandiford
2017-10-31 18:25   ` James Greenhalgh
2017-10-27 13:37 ` [12/nn] [AArch64] Add const_offset field to aarch64_address_info Richard Sandiford
2017-11-02 10:09   ` James Greenhalgh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180106175722.GA15090@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=Marcus.Shawcroft@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=nd@arm.com \
    --cc=richard.sandiford@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).