Changes since v1:

- Updated the commit message to reflect the changes (including the subject).
- Replaced the POP/BEQ checks with chesk for {cmp,mov,orr,and}{eq,ne}.
- Removed the size check


Ok for trunk and releases/gcc-14?
Should I also push this to releases/gcc-13 and releases/gcc-12 as this is a
regression in r12-5301-g04520645038?

--

Instead of checking that a certain transformation is not used by
counting the number of return instructions and the number of BEQ
instructions, check that none of CMP, MOV, ORR and AND instructions are
suffixed with EQ or NE.
Also removed size check as it's very unstable (depends on optimization
in use).

gcc/testsuite/ChangeLog:

        PR testsuite/103298
        * gcc.target/arm/pr43920-2.c: Change to assembler pattern
        "(cmp|mov|orr|and)(eq|ne)" for the check. Remove size check.

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

diff --git a/gcc/testsuite/gcc.target/arm/pr43920-2.c 
b/gcc/testsuite/gcc.target/arm/pr43920-2.c
index c367d6bc15d..7bde9daea04 100644
--- a/gcc/testsuite/gcc.target/arm/pr43920-2.c
+++ b/gcc/testsuite/gcc.target/arm/pr43920-2.c
@@ -27,6 +27,4 @@ int getFileStartAndLength (int fd, int *start_, size_t 
*length_)
       return 0;
 }
 
-/* { dg-final { scan-assembler-times "pop" 2 } } */
-/* { dg-final { scan-assembler-times "beq" 3 } } */
-/* { dg-final { object-size text <= 54 { target { ! arm*-*-uclinuxfdpiceabi } 
} } } */
+/* { dg-final { scan-assembler-not "\t(cmp|mov|orr|and)(eq|ne)\t" } } */
-- 
2.25.1

Reply via email to