From: Ramana Radhakrishnan <ramana.radhakrishnan@foss.arm.com>
To: Kyrill Tkachov <kyrylo.tkachov@arm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>,
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Subject: Re: [PATCH][ARM][3/3] Implement negsicc, notsicc optabs
Date: Thu, 10 Sep 2015 09:17:00 -0000 [thread overview]
Message-ID: <55F148E7.4040609@foss.arm.com> (raw)
In-Reply-To: <55E5BFE9.7030301@arm.com>
On 01/09/15 16:10, Kyrill Tkachov wrote:
> [Resending with patch attached]
>
> Hi all,
>
> This third patch implements the new optabs for arm.
> Conveniently, we can reuse the recently refactored *if_neg_move pattern
> and extend it to cover the conditional NOT case.
> Although arm has conditional execution capabilities I have found that
> performing the transformation from patch 1/3 early on benefits arm as well.
> For example for code:
> int
> foonegsi (int a)
> {
> return a ? 25089992 : -25089992;
> }
>
> we currently generate:
> movw r2, #55240
> movw r3, #10296
> cmp r0, #0
> movt r2, 382
> movt r3, 65153
> movne r0, r2
> moveq r0, r3
> bx
>
> whereas with this patch we generate:
> movw r3, #10296
> cmp r0, #0
> movt r3, 65153
> mov r0, r3
> rsbne r0, r3, #0
> bx lr
>
>
> In SPEC2006 this doesn't trigger very often, so there were minimal code differences,
> but overall I claim this patch is an improvement.
>
> Bootstrapped and tested on arm-none-linux-gnueabihf.
>
> Ok for trunk if the midend changes in 1/3 are approved?
OK.
Thanks,
Ramana
>
> Thanks,
> Kyrill
>
> 2015-08-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/arm/arm.md (<NOT_NEG_op>sicc): New define_expand.
> (*if_neg_move): Rename to...
> (*if_<NOT_NEG_op>_move): ... This. Use NOT_NEG code iterator.
> * config/arm/iterators.md (NOT_NEG): New code iterator.
> (NOT_NEG_op): New code attribute.
>
> 2015-08-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * gcc.target/arm/cond_op_imm_1.c: New test.
next prev parent reply other threads:[~2015-09-10 9:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 15:10 Kyrill Tkachov
2015-09-10 9:17 ` Ramana Radhakrishnan [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-09-01 15:04 Kyrill Tkachov
2015-09-01 15:09 ` pinskia
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=55F148E7.4040609@foss.arm.com \
--to=ramana.radhakrishnan@foss.arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
--cc=ramana.radhakrishnan@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).