[GCC][PATCH][Aarch64] Add Bfloat16_t scalar type, vector types and machine modes to Aarch64 back-end [2/2]

Stam Markianos-Wright Stam.Markianos-Wright@arm.com
Fri Jan 10 16:22:00 GMT 2020



On 1/9/20 4:13 PM, Stam Markianos-Wright wrote:
> 
> 
> On 1/9/20 4:07 PM, Richard Sandiford wrote:
>> Stam Markianos-Wright <Stam.Markianos-Wright@arm.com> writes:
>>> diff --git a/gcc/testsuite/g++.target/aarch64/bfloat_cpp_typecheck.C 
>>> b/gcc/testsuite/g++.target/aarch64/bfloat_cpp_typecheck.C
>>> new file mode 100644
>>> index 00000000000..55cbb0b0ef7
>>> --- /dev/null
>>> +++ b/gcc/testsuite/g++.target/aarch64/bfloat_cpp_typecheck.C
>>> @@ -0,0 +1,14 @@
>>> +/* { dg-do assemble { target { aarch64*-*-* } } } */
>>> +/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
>>> +/* { dg-add-options arm_v8_2a_bf16_neon }  */
>>> +/* { dg-additional-options "-O3 --save-temps" } */
>>> +
>>> +#include <arm_neon.h>
>>> +
>>> +void foo (void)
>>> +{
>>> +  bfloat16_t (); /* { dg-error {invalid conversion to type 'bfloat16_t'} "" 
>>> {target *-*-*} } */
>>
>> The "" {target *-*-*} stuff isn't needed: that's just for when the test
>> depends on a target selector or if you need to specify a line number
>> (which comes after the target).

Removed them.

> 
> Ah ok cool. I just had something that worked and was just doing ctrl+c ctrl+v 
> everywhere!
> 
>>
>> Same for the rest of the patch.
>>
>>> +  bfloat16_t a = bfloat16_t(); /* { dg-error {invalid conversion to type 
>>> 'bfloat16_t'} "" {target *-*-*} } */
>>
>> Why's this one an error?  Looks like it should be OK.  Do we build
>> bfloat16_t() as a conversion from a zero integer?
>>
> Yea that's exactly what it looked like when I went into the debugging! But will 
> investigate a bit further and see if I can fix it for the next revision.
> 

Changed this to dg-bogus with an XFAIL for the purposes of this patch in Stage 3 :)

> Thank you so much for the help in getting these fixed :D
> 
> Cheers,
> Stam
> 
>> Looks good otherwise, thanks, but I think we should try to support
>> the line above if we can.
>>
>> Richard
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BFmode2of2.patch
Type: text/x-patch
Size: 48304 bytes
Desc: BFmode2of2.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200110/3e2242ac/attachment.bin>


More information about the Gcc-patches mailing list