From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Marcus Shawcroft <marcus.shawcroft@arm.com>,
Richard Earnshaw <Richard.Earnshaw@arm.com>,
James Greenhalgh <james.greenhalgh@arm.com>
Subject: Re: [PATCH][AArch64] Use SUBS for parallel subtraction and comparison with immediate
Date: Thu, 11 May 2017 10:15:00 -0000 [thread overview]
Message-ID: <5914399D.9080606@foss.arm.com> (raw)
In-Reply-To: <58F9C0E7.4070600@foss.arm.com>
Ping.
https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00932.html
Thanks,
Kyrill
On 21/04/17 09:20, Kyrill Tkachov wrote:
> Hi all,
>
> Our sub<mode>3_compare1 pattern is not enough to catch cases where we subtract an immediate
> and compare against in PARALLEL. This is due to the RTL canonicalisation rules that require
> subtractions of immediate IMM be represented as (plus x -IMM).
> So we need a bit of trickery to catch those cases and this patch does that.
> It adds a new define_insn to match the plus-negatable-immediate in parallel with a comparison
> and a peephole that will bring the two together when possible.
> Otherwise it's pretty straightforward.
>
> The testcase in the patch now generates a single SUBS-immediate instead of a SUB followed by a CMP.
>
> Bootstrapped and tested on aarch64-none-linux-gnu.
>
> Ok for GCC 8?
>
> Thanks,
> Kyrill
>
> 2017-04-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
> (peephole2): New peephole2 to emit the above.
> * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
>
> 2017-04-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * gcc.target/aarch64/subs_compare_2.c: New test.
>
next prev parent reply other threads:[~2017-05-11 10:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 8:39 Kyrill Tkachov
2017-05-11 10:15 ` Kyrill Tkachov [this message]
2017-06-02 10:39 ` Kyrill Tkachov
2017-06-02 14:02 ` 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=5914399D.9080606@foss.arm.com \
--to=kyrylo.tkachov@foss.arm.com \
--cc=Richard.Earnshaw@arm.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).