testsuite/arm: Add arm_softfp_ok or arm_hard_ok as needed.
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 20 Apr 2020 22:37:23 +0000 (22:37 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Tue, 23 Mar 2021 15:11:48 +0000 (15:11 +0000)
commitfcfad74515da38bf73d67e2eb76e81a3cd862340
tree82c891ffb06704cc5261cf6c2a512b187e43505b
parent451c51e8ed385d06d80776168897a1b2a2e5d870
testsuite/arm: Add arm_softfp_ok or arm_hard_ok as needed.

Several tests override the -mfloat-abi option detected by their
effective targets. Make sure it is supported, so that these tests are
unsupported rather than failures (the inclusion of arm_neon.h
otherwise fails for lack of gnu/stubs-*.h)

This avoids failures with
bfloat16_simd_2_1.c
bfloat16_simd_3_1.c
bf16_vldn_1.c
bf16_vstn_1.c on arm-linux-gnueabi
and
pr51968.c
bfloat16_simd_1_2.c
bfloat16_simd_2_2.c
bfloat16_simd_3_2.c on arm-linux-gnueabihf.

On arm-eabi with default cpu/fpu/mode and a+rm multilibs,
bfloat16_simd_2_1.c, bfloat16_simd_3_1.c, bf16_vstn_1.c and
bf16_vldn_1.c become unsupported instead of pass because arm_hard_ok
fails with "selected processor lacks an FPU". Since we also override
the fpu in dg-additional-options, we'd need another effective target
(say arm_hard_neon_ok) that would check -mfloat-abi=hard -mfpu=neon at
the same time. But we have already so many arm effective targets, it
doesn't seem like a good way forward.

2021-03-19  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/testsuite/
* gcc.target/arm/bfloat16_simd_1_2.c: Add arm_softfp_ok.
* gcc.target/arm/bfloat16_simd_2_2.c: Likewise.
* gcc.target/arm/bfloat16_simd_3_2.c: Likewise.
* gcc.target/arm/pr51968.c: Likewise.
* gcc.target/arm/bfloat16_simd_2_1.c: arm_hard_ok.
* gcc.target/arm/bfloat16_simd_3_1.c: Likewise.
* gcc.target/arm/simd/bf16_vldn_1.c: Likewise.
* gcc.target/arm/simd/bf16_vstn_1.c: Likewise.
gcc/testsuite/gcc.target/arm/bfloat16_simd_1_2.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_2_1.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_2_2.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_3_1.c
gcc/testsuite/gcc.target/arm/bfloat16_simd_3_2.c
gcc/testsuite/gcc.target/arm/pr51968.c
gcc/testsuite/gcc.target/arm/simd/bf16_vldn_1.c
gcc/testsuite/gcc.target/arm/simd/bf16_vstn_1.c