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-25 19:20:58+00:00
Changes: 7 changed files, 32 additions, 5 deletions
Head revision: azoff/gcc ref pr/arm_fp16_alternative_hw commit 
49d71ab8214d606400307ab7529e63274a34bfd4
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:

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                      |  4 ++++
 .../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, 32 insertions(+), 5 deletions(-)

-- 
2.54.0

Reply via email to