Stam Markianos-Wright <stam.markianos-wri...@arm.com> writes:
> On 12/20/19 2:13 PM, Richard Sandiford wrote:
>> Stam Markianos-Wright <stam.markianos-wri...@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

Reply via email to