On Thu, 19 Dec 2024 at 13:17, Christophe Lyon
<[email protected]> wrote:
>
> Without this patch, testcases using arm_v8_3a_fp16_complex_neon fail
> to compile on arm-linux-gnueabihf with
> fatal error: gnu/stubs-soft.h: No such file or directory
> because they are actually compiled with
> -mfloat-abi=softfp -mfpu=auto -mcpu=unset -march=armv8.3-a+fp16
>
> Fix this by including stdint.h in the sample code for the effective-target.
>
> This makes these tests PASS instead of being UNRESOLVED:
> fast-math-bb-slp-complex-add-half-float.c
> fast-math-bb-slp-complex-mla-half-float.c
> fast-math-bb-slp-complex-mls-half-float.c
> fast-math-bb-slp-complex-mul-half-float.c
> fast-math-complex-add-half-float.c
> fast-math-complex-mla-half-float.c
> fast-math-complex-mls-half-float.c
> fast-math-complex-mul-half-float.c
>
> except for two new
> FAIL: gcc.dg/vect/complex/fast-math-complex-mls-half-float.c scan-tree-dump
> vect "Found COMPLEX_ADD_ROT270"
> (and the same with -flto -ffat-lto-objects)
>
Actually, as Linaro CI shows, this is not quite true: the CI configures GCC
--with-float=hard --with-fpu=neon-fp-armv8 --with-mode=thumb --with-arch=armv8-a
and the test passes.
In my manual testing I'm using
--with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb
--with-tune=cortex-a9 --with-arch=armv7-a
and fast-math-complex-mls-half-float.c is compiled with:
-mfpu=neon -mfloat-abi=hard -mfpu=auto -mcpu=unset -march=armv8.3-a+simd
I'm not sure where the difference comes from...
Christophe
> gcc/testsuite/ChangeLog:
>
> * lib/target-supports.exp
> (check_effective_target_arm_v8_3a_fp16_complex_neon_ok_nocache):
> Include stdint.h.
> ---
> gcc/testsuite/lib/target-supports.exp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp
> b/gcc/testsuite/lib/target-supports.exp
> index a16e9534ccd..9f4e2700dd2 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -13298,6 +13298,7 @@ proc
> check_effective_target_arm_v8_3a_fp16_complex_neon_ok_nocache { } {
> #if !defined (__ARM_FEATURE_COMPLEX)
> #error "__ARM_FEATURE_COMPLEX not defined"
> #endif
> + #include <stdint.h>
> } "$flags -mcpu=unset -march=armv8.3-a+fp16"] } {
> set et_arm_v8_3a_fp16_complex_neon_flags \
> "$flags -mcpu=unset -march=armv8.3-a+fp16"
> --
> 2.34.1
>