Ok for trunk and releases/gcc-15?
For releases/gcc-15, I would also want to cherry-pick r16-562-g20c25919132 that 
converts
the test to use function body instead of three scan-assembler.

Changes since v1:
- Removed the acceptance of LDR as it's only generated without 
r15-7373-g5163cf2ae14. Since
   I'm currently looking into gcc-14 release, and made the patch in that scope, 
I ran it on
   trunk to ensure no new failures, but it's not actually needed. 

Changes sice v2:
- Disabled sched1 and sched2 to limit the possible order of instructions.


--

Disable sched2 and sched3 to only have one order of instructions to
consider.

gcc/testsuite/ChangeLog:

        * gcc.target/arm/unsigned-extend-2.c: Disable sched2 and sched3
        and update function body to match.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com>
---
 gcc/testsuite/gcc.target/arm/unsigned-extend-2.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c 
b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c
index d9f95a14277..8a1a293bc95 100644
--- a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c
+++ b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c
@@ -1,26 +1,21 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb2_ok } */
-/* { dg-options "-O2 -mthumb" } */
+/* { dg-options "-O2 -mthumb  -fno-schedule-insns -fno-schedule-insns2" } */
 /* { dg-final { check-function-bodies "**" "" } } */
 
 /*
 ** foo:
-**     movs    (r[0-9]+), #8
 ** (
-**     subs    \1, \1, #1
-**     ands    \1, \1, #255
+**     movs    (r[0-9]+), #8
 **     and     r0, r1, r0, lsr #1
-**     bne     .L[0-9]+
-**     bx      lr
-** |
 **     subs    \1, \1, #1
-**     and     r0, r1, r0, lsr #1
 **     ands    \1, \1, #255
 **     bne     .L[0-9]+
 **     bx      lr
 ** |
 **     push    {lr}
-**     dls     lr, \1
+**     movs    (r[0-9]+), #8
+**     dls     lr, \2
 **     and     r0, r1, r0, lsr #1
 **     le      lr, .L[0-9]+
 **     pop     {pc}
-- 
2.25.1

Reply via email to