From: Richard Sandiford <richard.sandiford@arm.com>
To: Stam Markianos-Wright <Stam.Markianos-Wright@arm.com>
Cc: "gcc-patches\@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Richard Earnshaw <Richard.Earnshaw@arm.com>,
Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>,
Marcus Shawcroft <Marcus.Shawcroft@arm.com>
Subject: Re: [GCC][PATCH][AArch64]Add ACLE intrinsics for dot product (usdot - vector, <us/su>dot - by element) for AArch64 AdvSIMD ARMv8.6 Extension
Date: Mon, 30 Dec 2019 10:29:00 -0000 [thread overview]
Message-ID: <mptr20mglkq.fsf@arm.com> (raw)
In-Reply-To: <fbe3daef-7569-e980-2d13-f2956ee419e1@arm.com> (Stam Markianos-Wright's message of "Mon, 30 Dec 2019 09:21:10 +0000")
Stam Markianos-Wright <Stam.Markianos-Wright@arm.com> writes:
> On 12/20/19 2:13 PM, Richard Sandiford wrote:
>> Stam Markianos-Wright <Stam.Markianos-Wright@arm.com> writes:
>>> +**...
>>> +**ret
>>> +*/
>>> +int32x2_t ufoo (int32x2_t r, uint8x8_t x, int8x8_t y)
>>> +{
>>> + return vusdot_s32 (r, x, y);
>>> +}
>>> +
>>
>> If we're using check-function-bodies anyway, it might be slightly more
>> robust to compile at -O and check for the exact RA. E.g.:
>>
>> /*
>> **ufoo:
>> **usdotv0\.2s, (v1\.8b, v2\.8b|v2\.8b, v1\.8b)
>> **ret
>> */
>>
>> Just a suggestion though -- either way is fine.
>
> done this too and as per our internal discussion also added one
> xx_untied tests for usdot and one for usdot_lane
>
> That's one xx_untied test for each of the RTL pattern types added in
> aarch64-simd.md. Lmk if this is ok!
>
> Also I found that the way we were using check-function-bodies wasn't
> actually checking the assembler correctly, so I've changed that to:
> +/* { dg-final { check-function-bodies "**" "" "" } } */
> +/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } } */
> which seems to perform more checks
Ah, OK, hadn't realised that we were cycling through optimisation
options already. In that case, it might be better to leave out the
-O from the dg-options and instead use:
/* { dg-skip-if "" { *-*-* } { { "-fno-fat-lto-objects" } { "-O0" } } } */
(untested).
It's unfortunate that we're skipping this for -O0 though. Ideally we'd
still compile the code and just skip the dg-final. Does it work if you do:
/* { dg-final { check-function-bodies "**" "" {-O[^0]} } } */
/* { dg-skip-if "" { *-*-* } { { "-fno-fat-lto-objects" } } } */
? Make sure that we actually still run the check-function-bodies when
optimisation is enabled. :-)
Also, I'm an idiot. The reason I'd used (...|...) in the regexps was
that "dot product is commutative". But of course that's not true for
these mixed-sign ops, so the string must be:
usdot v0\.2s, v1\.8b, v2\.8b
The patch copied the (...|...) regexps above to the lane tests, but those
wouldn't be commutative even if the operands had the same type.
Thanks,
Richard
next prev parent reply other threads:[~2019-12-30 10:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 10:18 Stam Markianos-Wright
2019-12-13 11:03 ` Richard Sandiford
2019-12-20 13:44 ` Stam Markianos-Wright
2019-12-20 14:24 ` Richard Sandiford
2019-12-30 9:22 ` Stam Markianos-Wright
2019-12-30 10:29 ` Richard Sandiford [this message]
2020-01-09 14:48 ` Stam Markianos-Wright
2020-01-09 15:53 ` Richard Sandiford
2020-01-16 16:14 ` Stam Markianos-Wright
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=mptr20mglkq.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=Kyrylo.Tkachov@arm.com \
--cc=Marcus.Shawcroft@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=Stam.Markianos-Wright@arm.com \
--cc=gcc-patches@gcc.gnu.org \
/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).