public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org
Subject: Re: Use extract_bit_field_as_subreg for vectors
Date: Sun, 19 Nov 2017 23:57:00 -0000	[thread overview]
Message-ID: <f55ab91a-2062-2321-b8a0-5526888af1f5@redhat.com> (raw)
In-Reply-To: <87lgjnnwrr.fsf@linaro.org>

On 11/03/2017 10:37 AM, Richard Sandiford wrote:
> extract_bit_field_1 tries to use vec_extract to extract part of a
> vector.  However, if that pattern isn't defined or if the operands
> aren't suitable, another good approach is to try a direct subreg
> reference.  This is particularly useful for multi-vector modes on
> SVE (e.g. when extracting one vector from an LD2 result).
> 
> The function would go on to try the same thing anyway, but only
> if there is an integer mode with the same size as the vector mode,
> which isn't true for SVE modes (and doesn't seem a good thing to
> require in general).  Even when there is an integer mode, doing the
> operation on the original modes avoids some unnecessary bitcasting.
> 
> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64-linux-gnu.
> OK to install?
> 
> Richard
> 
> 
> 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
> 	    Alan Hayward  <alan.hayward@arm.com>
> 	    David Sherwood  <david.sherwood@arm.com>
> 
> gcc/
> 	* expmed.c (extract_bit_field_1): For vector extracts,
> 	fall back to extract_bit_field_as_subreg if vec_extract
> 	isn't available.
OK.
jeff

      reply	other threads:[~2017-11-19 23:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 16:37 Richard Sandiford
2017-11-19 23:57 ` Jeff Law [this message]

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=f55ab91a-2062-2321-b8a0-5526888af1f5@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).