This is a summary of discussions relative to the merge request created by
Torbjörn Svensson (azoff) <[email protected]> titled
testsuite: arm: require fp16 alternative hw for tests
since its creation.
Description: I've run a regression test for arm-none-eabi,
r17-2573-g1b722d3b41f169 as reference, using
- thumb/arch=armv6s-m/cpu=cortex-m0/float-abi=soft/fpu=auto
- thumb/arch=armv6s-m/tune=cortex-m0/float-abi=soft/fpu=auto
- thumb/arch=armv7e-m+fp/cpu=cortex-m4/float-abi=hard/fpu=auto
- thumb/arch=armv7e-m+fp.dp/cpu=cortex-m7/float-abi=hard/fpu=auto
- thumb/arch=armv7e-m+fp.dp/tune=cortex-m7/float-abi=hard/fpu=auto
- thumb/arch=armv7e-m+fp/tune=cortex-m4/float-abi=hard/fpu=auto
- thumb/arch=armv7e-m+nofp/cpu=cortex-m4/float-abi=soft/fpu=auto
- thumb/arch=armv7e-m+nofp/cpu=cortex-m7/float-abi=soft/fpu=auto
- thumb/arch=armv7e-m+nofp/tune=cortex-m4/float-abi=soft/fpu=auto
- thumb/arch=armv7e-m+nofp/tune=cortex-m7/float-abi=soft/fpu=auto
- thumb/arch=armv7-m/cpu=cortex-m3/float-abi=soft/fpu=auto
- thumb/arch=armv7-m/tune=cortex-m3/float-abi=soft/fpu=auto
- thumb/arch=armv7ve+nofp/cpu=cortex-a7/float-abi=soft/fpu=auto
- thumb/arch=armv7ve+nofp/tune=cortex-a7/float-abi=soft/fpu=auto
- thumb/arch=armv7ve+simd/cpu=cortex-a7/float-abi=hard/fpu=auto
- thumb/arch=armv7ve+simd/tune=cortex-a7/float-abi=hard/fpu=auto
- thumb/arch=armv8.1-m.main+mve.fp+fp.dp/cpu=cortex-m55/float-abi=hard/fpu=auto
- thumb/arch=armv8.1-m.main+mve.fp+fp.dp/tune=cortex-m55/float-abi=hard/fpu=auto
-
thumb/arch=armv8.1-m.main+mve.fp+pacbti+fp.dp/cpu=cortex-m85/float-abi=hard/fpu=auto
-
thumb/arch=armv8.1-m.main+mve.fp+pacbti+fp.dp/tune=cortex-m85/float-abi=hard/fpu=auto
- thumb/arch=armv8.1-m.main+mve+nofp/cpu=cortex-m55/float-abi=soft/fpu=auto
- thumb/arch=armv8.1-m.main+mve+nofp/tune=cortex-m55/float-abi=soft/fpu=auto
-
thumb/arch=armv8.1-m.main+mve+pacbti+nofp/cpu=cortex-m85/float-abi=soft/fpu=auto
-
thumb/arch=armv8.1-m.main+mve+pacbti+nofp/tune=cortex-m85/float-abi=soft/fpu=auto
- thumb/arch=armv8-m.main+dsp+fp/cpu=cortex-m33/float-abi=hard/fpu=auto
- thumb/arch=armv8-m.main+dsp+fp/tune=cortex-m33/float-abi=hard/fpu=auto
- thumb/arch=armv8-m.main+dsp+nofp/cpu=cortex-m33/float-abi=soft/fpu=auto
- thumb/arch=armv8-m.main+dsp+nofp/tune=cortex-m33/float-abi=soft/fpu=auto
Out of the above targets, the tests passes on
- thumb/arch=armv7e-m+fp.dp/cpu=cortex-m7/float-abi=hard/fpu=auto
- thumb/arch=armv7e-m+fp.dp/tune=cortex-m7/float-abi=hard/fpu=auto
- thumb/arch=armv7ve+simd/cpu=cortex-a7/float-abi=hard/fpu=auto
- thumb/arch=armv7ve+simd/tune=cortex-a7/float-abi=hard/fpu=auto
Other targets are reported unsupported, since it's an execution test.
Ok for trunk, releases/gcc-16 and releases/gcc-15?
--
Currently, it's assumed that arm_fp16_alternative_ok is enough to run
the tests, but arm_fp16_alternative_ok allows multilib override. While
the test might link without trouble, execution will likely fail.
Add arm_fp16_alternative_hw to explicitly test that target can execute
fp16 instructions in alternative form.
Below tests are known to fail for
thumb/arch=armv7e-m+fp/cpu=cortex-m4/float-abi=hard/fpu=auto among other
targets.
gcc/ChangeLog:
* doc/sourcebuild.texi (arm_fp16_alternative_hw): Document.
gcc/testsuite/ChangeLog:
* g++.dg/ext/arm-fp16/arm-fp16-ops-3.C: Require effective target
arm_fp16_alternative_hw instead of arm_fp16_alternative_ok.
* 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.
* lib/target-supports.exp (arm_fp16_alternative_hw): New proc.
Signed-off-by: Torbjörn SVENSSON <[email protected]>
--
CC: [email protected]
The full and up to date discussion can be found at
https://forge.sourceware.org/gcc/gcc/pulls/202
The merge request has been closed without being merged directly on the forge
repository.
On 2026-07-27 08:48:29+00:00, Richard Earnshaw (rearnsha) <[email protected]>
approved the changes:
OK with requested changed
> +++ gcc/doc/sourcebuild.texi
> @@ -2127,1 +2127,4 @@
>
> +@item arm_fp16_alternative_hw
> +Test system supports executing VFP half-precision floating-point
> +instructions in the ARM FP16 alternative format. (Implies previous.)
I think we should avoid relative references (implises previous). It can
suddenly become very confusing if someone accidentally inserts another entry
between the two entries but doesn't notice that this needs an update.
Use (Implies @code(arm_fp16_alternative_ok).)
> +++ gcc/doc/sourcebuild.texi
> @@ -2127,1 +2127,4 @@
>
> +@item arm_fp16_alternative_hw
> +Test system supports executing VFP half-precision floating-point
> +instructions in the ARM FP16 alternative format. (Implies previous.)
Agree. I copied the block above and updated it for VFP.
Anyway, I updated the reference in the copied block too to avoid any future
issue like the one you mentioned.
Will push to trunk shortly.
On 2026-07-27 09:58:43+00:00, Torbjörn Svensson (azoff) wrote:
Pushed as r17-2724-g450658596be7b4, r16-9414-g4789a6600f4d91 and
r15-11419-g0cf2c695680fa2.