https://gcc.gnu.org/g:9d1365235ca55744e1d6f3c69d7feea94776132a
commit r17-4222-g9d1365235ca55744e1d6f3c69d7feea94776132a Author: Kyrylo Tkachov <[email protected]> Date: Mon Sep 14 12:27:01 2026 +0200 testsuite: arm: Fix short-IT ifcvt test target and branch scan -mrestrict-it is disabled for M-profile targets. Skip short-it-ifcvt-2.c on these targets using arm_cortex_m. The branch scan also matches rsbgt and rsble. Changes to RTL if-conversion exposed this false match by producing rsblt and rsbge instead. Match the complete branch mnemonic and allow both equivalent signed comparisons. gcc/testsuite/ChangeLog: * gcc.target/arm/short-it-ifcvt-2.c: Skip M-profile targets. Match complete conditional branch mnemonics and allow lt and ge. Signed-off-by: Kyrylo Tkachov <[email protected]> Diff: --- gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c b/gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c index 54dd3a628672..acf4c8dccec0 100644 --- a/gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c +++ b/gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mthumb -mrestrict-it" } */ /* { dg-require-effective-target arm_thumb2_ok } */ +/* { dg-skip-if "-mrestrict-it does not apply to M-profile" arm_cortex_m } */ int f1(int x, int y, int z) @@ -18,4 +19,4 @@ f1(int x, int y, int z) } return x + y + z; } -/* { dg-final { scan-assembler "b(gt|le)" } } */ +/* { dg-final { scan-assembler {\tb(gt|le|lt|ge)(\.[nw])?\s} } } */
