From: Richard Earnshaw <rearnsha@arm.com>
To: Dmitry Melnik <dm@ispras.ru>
Cc: gcc-patches@gcc.gnu.org,
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
Andrey Belevantsev <abel@ispras.ru>
Subject: Re: [PATCH, ARM] Reload register class fix for NEON constants
Date: Wed, 04 May 2011 10:00:00 -0000 [thread overview]
Message-ID: <1304502795.19537.20.camel@e102346-lin.cambridge.arm.com> (raw)
In-Reply-To: <4DB595B3.3080708@ispras.ru>
On Mon, 2011-04-25 at 19:39 +0400, Dmitry Melnik wrote:
> Hi All,
>
> The attached patch changes the reload class for NEON constant vectors
> from GENERAL_REGS to NO_REGS.
> The issue was found on this code from libevas:
>
> void
> _op_blend_p_caa_dp(unsigned *s, unsigned* e, unsigned *d, unsigned c) {
> while (d < e) {
> *d = ( (((((*s) >> 8) & 0x00ff00ff) * (c)) & 0xff00ff00) +
> (((((*s) & 0x00ff00ff) * (c)) >> 8) & 0x00ff00ff) );
> //*d = (*s) & 0x00ff00ff;
> d++;
> s++;
> }
> }
>
> Original asm:
>
> .L4:
> adr r8, .L10
> ldmia r8, {r8-fp}
> ...
> vmov d22, r8, r9 @ v4si
> vmov d23, sl, fp
> vand q12, q8, q11
> ...
> bhi .L4
>
> .L10:
> .word 16711935 @ 0xff00ff
> .word 16711935
> .word 16711935
> .word 16711935
>
> Fixed asm:
>
> .L4:
> vmov.i16 q11, #255 @ v4si
> ...
> vand q12, q8, q11
> bhi .L4
>
> This fix results in +3.7% gain for expedite (reduced) test suite, and up
> to 15% for affected tests.
>
> Ok for trunk?
2011-04-22 Sergey Grechanik <mouseentity@ispras.ru>
* config/arm/arm.c (coproc_secondary_reload_class): Treat constant
vectors the same way as memory locations to prevent loading them
through the ARM general registers.
Just say:
* arm.c (coproc_secondary_reload_class): Return NO_REGS for constant
vectors.
Otherwise OK.
R.
prev parent reply other threads:[~2011-05-04 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 16:45 Dmitry Melnik
2011-05-04 10:00 ` Richard Earnshaw [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=1304502795.19537.20.camel@e102346-lin.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=abel@ispras.ru \
--cc=dm@ispras.ru \
--cc=gcc-patches@gcc.gnu.org \
--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).