https://gcc.gnu.org/g:6671a011635423c382ea93497e35e693753a11ea
commit r17-3894-g6671a011635423c382ea93497e35e693753a11ea Author: Kyrylo Tkachov <[email protected]> Date: Thu Sep 3 11:33:15 2026 +0200 testsuite: Force Thumb-2 for short-IT ifcvt tests The short-it-ifcvt tests verify that -mrestrict-it limits if-conversion. This option applies only to Thumb-2, but the tests did not select Thumb-2. An Arm-state test board therefore disabled the option and used the normal Arm if-conversion limit. The new multi-set diamond conversion then removed the branch in short-it-ifcvt-1.c and made its Thumb-specific scan fail. Add -mthumb to both tests. This makes their test mode independent of the board default and makes them exercise the intended restricted-IT policy. gcc/testsuite/ChangeLog: * gcc.target/arm/short-it-ifcvt-1.c: Add -mthumb. * gcc.target/arm/short-it-ifcvt-2.c: Likewise. Signed-off-by: Kyrylo Tkachov <[email protected]> Diff: --- gcc/testsuite/gcc.target/arm/short-it-ifcvt-1.c | 2 +- gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/short-it-ifcvt-1.c b/gcc/testsuite/gcc.target/arm/short-it-ifcvt-1.c index f3d29b7d2344..f4b0049feb51 100644 --- a/gcc/testsuite/gcc.target/arm/short-it-ifcvt-1.c +++ b/gcc/testsuite/gcc.target/arm/short-it-ifcvt-1.c @@ -1,6 +1,6 @@ /* Test that ifcvt is not being too aggressive when -mrestrict-it. */ /* { dg-do compile } */ -/* { dg-options "-O2 -mrestrict-it" } */ +/* { dg-options "-O2 -mthumb -mrestrict-it" } */ /* { dg-require-effective-target arm_thumb2_ok } */ int 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 9ac8153069f0..54dd3a628672 100644 --- a/gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c +++ b/gcc/testsuite/gcc.target/arm/short-it-ifcvt-2.c @@ -1,6 +1,6 @@ /* Test that ifcvt is not being too aggressive when -mrestrict-it. */ /* { dg-do compile } */ -/* { dg-options "-O2 -mrestrict-it" } */ +/* { dg-options "-O2 -mthumb -mrestrict-it" } */ /* { dg-require-effective-target arm_thumb2_ok } */ int
