public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: James Greenhalgh <james.greenhalgh@arm.com>, gcc-patches@gcc.gnu.org
Cc: marcus.shawcroft@arm.com
Subject: Re: [AArch64] Tighten predicates on SIMD shift intrinsics
Date: Thu, 25 Sep 2014 15:18:00 -0000	[thread overview]
Message-ID: <54243242.7000302@redhat.com> (raw)
In-Reply-To: <1411657518-25872-1-git-send-email-james.greenhalgh@arm.com>

On 09/25/2014 08:05 AM, James Greenhalgh wrote:
> 
> On Fri, Sep 19, 2014 at 05:57:06PM +0100, Richard Henderson wrote:
>> On 09/11/2014 01:29 AM, James Greenhalgh wrote:
>>> +;; Predicates used by the various SIMD shift operations.  These
>>> +;; fall in to 3 categories.
>>> +;;   Shifts with a range 0-(bit_size - 1) (aarch64_simd_shift_imm)
>>> +;;   Shifts with a range 1-bit_size (aarch64_simd_shift_imm_offset)
>>> +;;   Shifts with a range 0-bit_size (aarch64_simd_shift_imm_bitsize)
>>> +(define_predicate "aarch64_simd_shift_imm_qi"
>>> +  (and (match_code "const_int")
>>> +       (match_test "aarch64_simd_const_bounds (op, 0, 7)")))
>>
>> The function call should be removed and this should be written as
>>
>>   (match_test "IN_RANGE (ival, 0, 7)")
>>
> 
> Quite right, updated as attached.
> 
> Cross-tested for aarch64-none-elf with no issues.
> 
> OK?
> 
> Thanks,
> James
> 
> ---
> gcc/
> 
> 2014-09-25  James Greenhalgh  <james.greenhalgh@arm.com>
> 
> 	* config/aarch64/aarch64-protos.h (aarch64_simd_const_bounds): Delete.
> 	* config/aarch64/aarch64-simd.md (aarch64_<sur>q<r>shl<mode>): Use
> 	new predicates.
> 	(aarch64_<sur>shll2_n<mode>): Likewise.
> 	(aarch64_<sur>shr_n<mode>): Likewise.
> 	(aarch64_<sur>sra_n<mode>: Likewise.
> 	(aarch64_<sur>s<lr>i_n<mode>): Likewise.
> 	(aarch64_<sur>qshl<u>_n<mode>): Likewise.
> 	* config/aarch64/aarch64.c (aarch64_simd_const_bounds): Delete.
> 	* config/aarch64/iterators.md (ve_mode): New.
> 	(offsetlr): Remap to infix text for use in new predicates.
> 	* config/aarch64/predicates.md (aarch64_simd_shift_imm_qi): New.
> 	(aarch64_simd_shift_imm_hi): Likewise.
> 	(aarch64_simd_shift_imm_si): Likewise.
> 	(aarch64_simd_shift_imm_di): Likewise.
> 	(aarch64_simd_shift_imm_offset_qi): Likewise.
> 	(aarch64_simd_shift_imm_offset_hi): Likewise.
> 	(aarch64_simd_shift_imm_offset_si): Likewise.
> 	(aarch64_simd_shift_imm_offset_di): Likewise.
> 	(aarch64_simd_shift_imm_bitsize_qi): Likewise.
> 	(aarch64_simd_shift_imm_bitsize_hi): Likewise.
> 	(aarch64_simd_shift_imm_bitsize_si): Likewise.
> 	(aarch64_simd_shift_imm_bitsize_di): Likewise.

Looks good to me.


r~

  reply	other threads:[~2014-09-25 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  8:30 James Greenhalgh
2014-09-19 10:59 ` James Greenhalgh
2014-09-19 16:57 ` Richard Henderson
2014-09-25 15:05   ` James Greenhalgh
2014-09-25 15:18     ` Richard Henderson [this message]
2014-09-25 16:04       ` Marcus Shawcroft

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=54243242.7000302@redhat.com \
    --to=rth@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=james.greenhalgh@arm.com \
    --cc=marcus.shawcroft@arm.com \
    /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).