Hi gcc-patches mailing list, Torbjörn Svensson via Sourceware Forge <[email protected]> has requested that the following forgejo pull request be published on the mailing list.
Created on: 2026-07-25 19:18:06+00:00 Latest update: 2026-07-27 09:58:43+00:00 Changes: 7 changed files, 34 additions, 6 deletions Head revision: azoff/gcc ref pr/arm_fp16_alternative_hw commit 68d2d1b3417ad15423e6dfcd1460c736c52a4bdf Base revision: gcc/gcc ref trunk commit 7c89181457dafe48203c0ce31a429c3e887dd378 r17-2676-g7c89181457dafe Merge base: 7c89181457dafe48203c0ce31a429c3e887dd378 Full diff url: https://forge.sourceware.org/gcc/gcc/pulls/202.diff Discussion: https://forge.sourceware.org/gcc/gcc/pulls/202 Requested Reviewers: rearnsha 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]> -- Changed files: - M: gcc/doc/sourcebuild.texi - M: gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-3.C - M: gcc/testsuite/g++.dg/ext/arm-fp16/arm-fp16-ops-4.C - M: gcc/testsuite/gcc.dg/torture/arm-fp16-int-convert-alt.c - M: gcc/testsuite/gcc.dg/torture/arm-fp16-ops-3.c - M: gcc/testsuite/gcc.dg/torture/arm-fp16-ops-4.c - M: gcc/testsuite/lib/target-supports.exp Torbjörn SVENSSON (1): testsuite: arm: require fp16 alternative hw for tests gcc/doc/sourcebuild.texi | 7 +++++- .../g++.dg/ext/arm-fp16/arm-fp16-ops-3.C | 2 +- .../g++.dg/ext/arm-fp16/arm-fp16-ops-4.C | 2 +- .../gcc.dg/torture/arm-fp16-int-convert-alt.c | 2 +- gcc/testsuite/gcc.dg/torture/arm-fp16-ops-3.c | 2 +- gcc/testsuite/gcc.dg/torture/arm-fp16-ops-4.c | 2 +- gcc/testsuite/lib/target-supports.exp | 23 +++++++++++++++++++ 7 files changed, 34 insertions(+), 6 deletions(-) Range-diff against v1: 1: 49d71ab8214d ! 1: 68d2d1b3417a testsuite: arm: require fp16 alternative hw for tests @@ Commit message gcc/ChangeLog: * doc/sourcebuild.texi (arm_fp16_alternative_hw): Document. + (arm_neon_fp16_hw): Add reference to arm_neon_fp16_ok. gcc/testsuite/ChangeLog: @@ Commit message Signed-off-by: Torbjörn SVENSSON <[email protected]> ## gcc/doc/sourcebuild.texi ## -@@ gcc/doc/sourcebuild.texi: Test system supports executing Neon half-precision float instructions. +@@ gcc/doc/sourcebuild.texi: options, including @code{-mfp16-format=ieee} if necessary to obtain the + + @item arm_neon_fp16_hw + Test system supports executing Neon half-precision float instructions. +-(Implies previous.) ++(Implies @code(arm_neon_fp16_ok).) + + @item arm_fp16_alternative_ok ARM target supports the ARM FP16 alternative format. Some multilibs may be incompatible with the options needed. +@item arm_fp16_alternative_hw +Test system supports executing VFP half-precision floating-point -+instructions in the ARM FP16 alternative format. (Implies previous.) ++instructions in the ARM FP16 alternative format. (Implies ++@code(arm_fp16_alternative_ok).) + @item arm_fp16_none_ok ARM target supports specifying none as the ARM FP16 format. -- 2.54.0
