Hi Christophe, Alexandre, Andrew and Richard,

Sorry for the very late reply. I've been occupied with other tasks than GCC for the past 3 months.

On 2025-05-20 09:56, Christophe Lyon wrote:
On Tue, 20 May 2025 at 06:30, Alexandre Oliva <ol...@adacore.com> wrote:


(The backport I've only just posted is not enough for the tests to pass;
there's another problem)

r14-10824 is a backport of r15-4549, that rewrote and extended into
check-function-bodies the save/restore expectations introduced in
r15-2160.  Alas, r15-2160 mentions an insn_propagation patch that
enables those specific save/restore insns to be generated, presumably
r15-1945, and this change is not present in gcc-14, so we get
different save/restore insns, and the test fails, even after
backporting r15-1035, that allows for single-character function names
in check-function-bodies.


I thought Torbjorn had tested this on gcc-14 and needed it to have
cleaner results,
but https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667448.html
indicates we already noticed the failure some time ago...


I must have messed up when I tested this with gcc-14 and I've apparently also missed the ping from Andrew back in Nov. Really sorry.


Drop the save/restore checks that don't belong in gcc-14.

Tested with gcc-14 on arm-vxworks7r2.  Ok to install in gcc-14?


for  gcc/testsuite/ChangeLog

         * gcc.target/arm/fp16-aapcs-1.c: Drop save/restore checks.
         * gcc.target/arm/fp16-aapcs-2.c: Likewise.
         * gcc.target/arm/fp16-aapcs-3.c: Likewise.
         * gcc.target/arm/fp16-aapcs-4.c: Likewise.
---
  gcc/testsuite/gcc.target/arm/fp16-aapcs-1.c |    7 ++-----
  gcc/testsuite/gcc.target/arm/fp16-aapcs-2.c |    8 --------
  gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c |    7 ++-----
  gcc/testsuite/gcc.target/arm/fp16-aapcs-4.c |    8 --------
  4 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/fp16-aapcs-1.c 
b/gcc/testsuite/gcc.target/arm/fp16-aapcs-1.c
index b18d7cda65c8d..450c52fcd5c6c 100644
--- a/gcc/testsuite/gcc.target/arm/fp16-aapcs-1.c
+++ b/gcc/testsuite/gcc.target/arm/fp16-aapcs-1.c
@@ -29,10 +29,8 @@ Below block is for non-armv8.1
  ** ...
  **     vmov\.f32       s0, \2
  ** )
-**     vstr\.32        s2, \[sp, #4\]  @ int
+** ...
  **     bl      swap
-**     vldr\.32        s2, \[sp, #4\]  @ int
-**     vmov\.f32       s0, s2

  ** |

@@ -50,9 +48,8 @@ Below block is for armv8.1
  ** ...
  **     vmov    s0, \4  @ __fp16
  ** )
-**     vstr\.32        s2, \[sp, #4\]  @ int
+** ...
  **     bl      swap
-**     vldr\.16        s0, \[sp, #4\]

  ** )
  ** ...
diff --git a/gcc/testsuite/gcc.target/arm/fp16-aapcs-2.c 
b/gcc/testsuite/gcc.target/arm/fp16-aapcs-2.c
index 48510e895368d..c15f29dd3e44b 100644
--- a/gcc/testsuite/gcc.target/arm/fp16-aapcs-2.c
+++ b/gcc/testsuite/gcc.target/arm/fp16-aapcs-2.c
@@ -28,14 +28,6 @@ swap (__fp16, __fp16);
  ** )
  ** ...
  */
-/*
-** F: { target arm_little_endian }
-** ...
-**     str     r2, \[sp, #4\]
-**     bl      swap
-**     ldrh    r0, \[sp, #4\]  @ __fp16

Is it expected that you also remove the 'bl swap' part?

I think it's fine to remove the entire block since the 'bl swap' is checked in the other block.


-** ...
-*/
  __fp16
  F (__fp16 a, __fp16 b, __fp16 c)
  {
diff --git a/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c 
b/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c
index 7238ef3a02e03..1102dc7344919 100644
--- a/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c
+++ b/gcc/testsuite/gcc.target/arm/fp16-aapcs-3.c
@@ -29,10 +29,8 @@ Below block is for non-armv8.1
  ** ...
  **     vmov\.f32       s0, \2
  ** )
-**     vstr\.32        s2, \[sp, #4\]  @ int
+** ...
  **     bl      swap
-**     vldr\.32        s2, \[sp, #4\]  @ int
-**     vmov\.f32       s0, s2

  ** |

@@ -50,9 +48,8 @@ Below block is for armv8.1
  ** ...
  **     vmov    s0, \4
  ** )
-**     vstr\.32        s2, \[sp, #4\]  @ int
+** ...
  **     bl      swap
-**     vldr\.16        s0, \[sp, #4\]

  ** )
  ** ...
diff --git a/gcc/testsuite/gcc.target/arm/fp16-aapcs-4.c 
b/gcc/testsuite/gcc.target/arm/fp16-aapcs-4.c
index 13f08d8afa32d..00a44d15129a8 100644
--- a/gcc/testsuite/gcc.target/arm/fp16-aapcs-4.c
+++ b/gcc/testsuite/gcc.target/arm/fp16-aapcs-4.c
@@ -28,14 +28,6 @@ swap (__fp16, __fp16);
  ** )
  ** ...
  */
-/*
-** F: { target arm_little_endian }
-** ...
-**     str     r2, \[sp, #4\]
-**     bl      swap
-**     ldrh    r0, \[sp, #4\]  @ __fp16
Same question here?

I think it's fine to remove the entire block since the 'bl swap' is checked in the other block.


@Richard: Do you think there is any reason to not include this on releases/gcc-14?


Kind regards,
Torbjörn

Reply via email to