From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: James Greenhalgh <James.Greenhalgh@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH][AArch64] Improve dup pattern
Date: Tue, 20 Jun 2017 15:19:00 -0000 [thread overview]
Message-ID: <AM5PR0802MB26109BEAEC4C11E363505B7683C50@AM5PR0802MB2610.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20170620111407.GA33842@arm.com>
James Greenhalgh wrote:
>
> Have you tested this in cases where an integer dup is definitely the right
> thing to do?
Yes, this still generates:
#include <arm_neon.h>
void f(unsigned a, unsigned b, uint32x4_t *c)
{
c[0] = vdupq_n_u32(a);
c[1] = vdupq_n_u32(b);
}
dup v1.4s, w0
dup v0.4s, w1
str q1, [x2]
str q0, [x2, 16]
ret
The reason is that the GP to FP register move cost is typically >= 5, while
the additional cost of '?' is just 1.
> And similar cases? If these still look good, then the patch is OK - though
> I'm still very nervous about the register allocator cost model!
Well it's complex and hard to get working well... However slightly preferring one
variant works alright (unlike using '*' which results in incorrect costs).
Wilco
prev parent reply other threads:[~2017-06-20 15:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 10:58 Wilco Dijkstra
2017-06-20 11:14 ` James Greenhalgh
2017-06-20 15:19 ` Wilco Dijkstra [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=AM5PR0802MB26109BEAEC4C11E363505B7683C50@AM5PR0802MB2610.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=James.Greenhalgh@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@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).