[PATCH] arm: [testcase] Better narrow some bfloat16 testcase

Andrea Corallo andrea.corallo@arm.com
Thu Nov 5 14:30:27 GMT 2020


Christophe Lyon <christophe.lyon@linaro.org> writes:

> On Thu, 5 Nov 2020 at 12:11, Andrea Corallo <andrea.corallo@arm.com> wrote:
>>
>> Christophe Lyon <christophe.lyon@linaro.org> writes:
>>
>> [...]
>>
>> >> I think you need to add -mfloat-abi=hard to the dg-additional-options
>> >> otherwise vld1_lane_bf16_1.c
>> >> fails on targets with a soft float-abi default (eg arm-linux-gnueabi).
>> >>
>> >> See bf16_vldn_1.c.
>> >
>> > Actually that's not sufficient because in turn we get:
>> > /sysroot-arm-none-linux-gnueabi/usr/include/gnu/stubs.h:10:11: fatal
>> > error: gnu/stubs-hard.h: No such file or directory
>> >
>> > So you should check that -mfloat-abi=hard is supported.
>> >
>> > Ditto for the vst tests.
>>
>> Hi Christophe,
>>
>> this patch should implement your suggestions.
>>
>> On my arm-none-linux-gnueabi setup the tests were already skipped
>> as unsupported so if you could test and confirm this fixes the
>> issue you see would be great.
>
> Do you know why they are unsupported in your setup?

We probably have a different GCC configuration.  Could you share how
it's configured your?

>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
>> index 15f0649f8ae..2ab7e39756d 100644
>> --- a/gcc/testsuite/lib/target-supports.exp
>> +++ b/gcc/testsuite/lib/target-supports.exp
>> @@ -5213,6 +5213,10 @@ proc check_effective_target_arm_v8_2a_bf16_neon_ok_nocache { } {
>>          return 0;
>>      }
>>
>> +    if { ! [check_effective_target_arm_hard_ok] } {
>> + return 0;
>> +    }
>> +
>>     foreach flags {"" "-mfloat-abi=hard -mfpu=neon-fp-armv8" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" } {
>>         if { [check_no_compiler_messages_nocache arm_v8_2a_bf16_neon_ok object {
>>             #include <arm_neon.h>
>
> This seems strange since you would now exit early if
> check_effective_target_arm_hard_ok is false, so you'll never need the
> -mfloat-abi=softfp version of the flags.

So IIUC your suggestion would be to test with higher priority softfp and
in case we decide to go for hardfp make sure
check_effective_target_arm_hard_ok is satisfied.  Am I correct?

> BTW in general, I think softfp is tried before hard in the other
> similar effective targets, any reason the order is different here?

No idea.

Thanks

  Andrea


More information about the Gcc-patches mailing list