On Thu, 23 Apr 2020 at 15:55, Christophe Lyon
<christophe.l...@linaro.org> wrote:
>
> Make the order in which we try -mfloat-abi options consistent with the
> other similar effective targets: try softfp first, then hard.
>
> We have new failures on arm-eabi:
> FAIL: gcc.target/arm/bfloat16_scalar_1_1.c check-function-bodies stacktest1
> FAIL: gcc.target/arm/bfloat16_simd_1_1.c check-function-bodies stacktest1
> FAIL: gcc.target/arm/bfloat16_simd_1_1.c check-function-bodies stacktest2
> FAIL: gcc.target/arm/bfloat16_simd_1_1.c check-function-bodies stacktest3
> FAIL: gcc.target/arm/simd/bf16_ma_1.c check-function-bodies test_vfmabq_f32
> FAIL: gcc.target/arm/simd/bf16_ma_1.c check-function-bodies 
> test_vfmabq_lane_f32
> FAIL: gcc.target/arm/simd/bf16_ma_1.c check-function-bodies 
> test_vfmabq_laneq_f32
> FAIL: gcc.target/arm/simd/bf16_ma_1.c check-function-bodies test_vfmatq_f32
> FAIL: gcc.target/arm/simd/bf16_ma_1.c check-function-bodies 
> test_vfmatq_lane_f32
> FAIL: gcc.target/arm/simd/bf16_ma_1.c check-function-bodies 
> test_vfmatq_laneq_f32
> FAIL: gcc.target/arm/simd/bf16_mmla_1.c check-function-bodies test_vmmlaq_f32
> FAIL: gcc.target/arm/simd/vdot-2-1.c check-function-bodies sfoo_lane
> FAIL: gcc.target/arm/simd/vdot-2-1.c check-function-bodies sfooq_lane
> FAIL: gcc.target/arm/simd/vdot-2-1.c check-function-bodies usfoo
> FAIL: gcc.target/arm/simd/vdot-2-1.c check-function-bodies usfoo_lane
> FAIL: gcc.target/arm/simd/vdot-2-1.c check-function-bodies usfoo_lane_untied
> FAIL: gcc.target/arm/simd/vdot-2-1.c check-function-bodies usfoo_untied
> FAIL: gcc.target/arm/simd/vdot-2-1.c check-function-bodies usfooq_lane
> FAIL: gcc.target/arm/simd/vdot-2-2.c check-function-bodies sfoo_lane
> FAIL: gcc.target/arm/simd/vdot-2-2.c check-function-bodies sfooq_lane
> FAIL: gcc.target/arm/simd/vdot-2-2.c check-function-bodies usfoo
> FAIL: gcc.target/arm/simd/vdot-2-2.c check-function-bodies usfoo_lane
> FAIL: gcc.target/arm/simd/vdot-2-2.c check-function-bodies usfoo_lane_untied
> FAIL: gcc.target/arm/simd/vdot-2-2.c check-function-bodies usfoo_untied
> FAIL: gcc.target/arm/simd/vdot-2-2.c check-function-bodies usfooq_lane
>
> are these tests supposed to require -float-abi=hard?
>

Hmm, actually they do because the check-funciton-bodies are tailored
to float-abi=hard prologue/epilogue.

It's tricky to make it work, as the result depends on how the
toolchain is configured.
For instance on arm-eabi with the default cpu/fpu,
dg-require-effective-target arm_hard_ok fails because:
cc1: error: '-mfloat-abi=hard': selected processor lacks an FPU

but the other effective-target used by these tests (eg
arm_v8_2a_fp16_scalar_ok force an FPU, so then it's OK to force
-mfloat-abi=hard.
However this really works only if the target supports that multlib,
which may not be the case.

It seems it's not possible to write these tests so that they works in
all combinations of
toolchain configuration and options used for testing :-(


> 2020-04-21  Christophe Lyon  <christophe.l...@linaro.org>
>
>         gcc/testsuite/
>         * lib/target-supports.exp
>         (check_effective_target_arm_v8_2a_i8mm_ok_nocache): Fix
>         -mfloat-abi= options order.
>         (check_effective_target_arm_v8_2a_bf16_neon_ok_nocache): Likewise.
> ---
>  gcc/testsuite/lib/target-supports.exp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp 
> b/gcc/testsuite/lib/target-supports.exp
> index a667ddf..53ff2f6 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -5017,7 +5017,7 @@ proc check_effective_target_arm_v8_2a_i8mm_ok_nocache { 
> } {
>
>      # Iterate through sets of options to find the compiler flags that
>      # need to be added to the -march option.
> -    foreach flags {"" "-mfloat-abi=hard -mfpu=neon-fp-armv8" 
> "-mfloat-abi=softfp -mfpu=neon-fp-armv8" } {
> +    foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" 
> "-mfloat-abi=hard -mfpu=neon-fp-armv8" } {
>          if { [check_no_compiler_messages_nocache \
>                    arm_v8_2a_i8mm_ok object {
>              #include <arm_neon.h>
> @@ -5102,7 +5102,7 @@ proc 
> check_effective_target_arm_v8_2a_bf16_neon_ok_nocache { } {
>          return 0;
>      }
>
> -    foreach flags {"" "-mfloat-abi=hard -mfpu=neon-fp-armv8" 
> "-mfloat-abi=softfp -mfpu=neon-fp-armv8" } {
> +    foreach flags {"" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" 
> "-mfloat-abi=hard -mfpu=neon-fp-armv8" } {
>          if { [check_no_compiler_messages_nocache arm_v8_2a_bf16_neon_ok 
> object {
>              #include <arm_neon.h>
>              #if !defined (__ARM_FEATURE_BF16_VECTOR_ARITHMETIC)
> --
> 2.7.4
>

Reply via email to