arm: testsuite: fix issues relating to fp16 alternative testing
The v*_fp16_xN_1.c tests on Arm have been unstable since they were added. This is not a problem with the tests themselves, or even the patches that were added, but with the testsuite infrastructure. It turned out that another set of dg- tests for fp16 were corrupting the cached set of options used by the new tests, leading to running the tests with incorrect flags. So the primary goal of this patch is to fix the incorrect internal caching of the options needed to enable fp16 alternative format on Arm: the code was storing the result in the same variable that was being used for neon_fp16 and this was leading to testsuite instability for tests that were checking for neon with fp16. But in cleaning this up I also noted that we weren't then applying the flags correctly having detected what they were, so we also address that. I suspect there are still some further issues to address here, since the framework does not correctly test that the multilibs and startup code enable alternative format; but this is still an improvement over what we had before. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_arm_fp16_alternative_ok_nocache): Use et_arm_fp16_alternative_flags to cache the result. Improve test for FP16 availability. (add_options_for_arm_fp16_alternative): Use et_arm_fp16_alternative_flags. * g++.dg/ext/arm-fp16/arm-fp16-ops-3.C: Update dg-* flags. * g++.dg/ext/arm-fp16/arm-fp16-ops-4.C: Likewise. * gcc.dg/torture/arm-fp16-int-convert-alt.c: Likewise. * gcc.dg/torture/arm-fp16-ops-3.c: Likewise. * gcc.dg/torture/arm-fp16-ops-4.c: Likewise. * gcc.target/arm/fp16-aapcs-3.c: Likewise. * gcc.target/arm/fp16-aapcs-4.c: Likewise. * gcc.target/arm/fp16-compile-alt-1.c: Likewise. * gcc.target/arm/fp16-compile-alt-10.c: Likewise. * gcc.target/arm/fp16-compile-alt-11.c: Likewise. * gcc.target/arm/fp16-compile-alt-12.c: Likewise. * gcc.target/arm/fp16-compile-alt-2.c: Likewise. * gcc.target/arm/fp16-compile-alt-3.c: Likewise. * gcc.target/arm/fp16-compile-alt-4.c: Likewise. * gcc.target/arm/fp16-compile-alt-5.c: Likewise. * gcc.target/arm/fp16-compile-alt-6.c: Likewise. * gcc.target/arm/fp16-compile-alt-7.c: Likewise. * gcc.target/arm/fp16-compile-alt-8.c: Likewise. * gcc.target/arm/fp16-compile-alt-9.c: Likewise. * gcc.target/arm/fp16-rounding-alt-1.c: Likewise.
Showing
- gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-3.C 1 addition, 1 deletiongcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-3.C
- gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-4.C 2 additions, 1 deletiongcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-4.C
- gcc/testsuite/gcc.dg/torture/arm-fp16-int-convert-alt.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/torture/arm-fp16-int-convert-alt.c
- gcc/testsuite/gcc.dg/torture/arm-fp16-ops-3.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/torture/arm-fp16-ops-3.c
- gcc/testsuite/gcc.dg/torture/arm-fp16-ops-4.c 2 additions, 1 deletiongcc/testsuite/gcc.dg/torture/arm-fp16-ops-4.c
- gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c 2 additions, 1 deletiongcc/testsuite/gcc.target/arm/fp16-aapcs-3.c
- gcc/testsuite/gcc.target/arm/fp16-aapcs-4.c 2 additions, 1 deletiongcc/testsuite/gcc.target/arm/fp16-aapcs-4.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-1.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-1.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-10.c 2 additions, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-10.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-11.c 2 additions, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-11.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-12.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-12.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-2.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-2.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-3.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-3.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-4.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-4.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-5.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-5.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-6.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-6.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-7.c 2 additions, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-7.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-8.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-8.c
- gcc/testsuite/gcc.target/arm/fp16-compile-alt-9.c 1 addition, 1 deletiongcc/testsuite/gcc.target/arm/fp16-compile-alt-9.c
- gcc/testsuite/gcc.target/arm/fp16-rounding-alt-1.c 3 additions, 1 deletiongcc/testsuite/gcc.target/arm/fp16-rounding-alt-1.c
Loading