Skip to content

Commit e7615f6

Browse files
testsuite: arm: Use -mtune=cortex-m4 for thumb-ifcvt.c test
On Cortex-M4, the code generated is: cmp r0, r1 itte ne lslne r0, r0, r1 asrne r0, r0, #1 moveq r0, r1 add r0, r0, r1 bx lr On Cortex-M7, the code generated is: cmp r0, r1 beq .L3 lsls r0, r0, r1 asrs r0, r0, #1 add r0, r0, r1 bx lr .L3: mov r0, r1 add r0, r0, r1 bx lr As Cortex-M7 only allow maximum one conditional instruction, force Cortex-M4 to have a stable test case. gcc/testsuite/ChangeLog: * gcc.target/arm/thumb-ifcvt.c: Use -mtune=cortex-m4. Signed-off-by: Torbjörn SVENSSON <[email protected]>
1 parent 09499ff commit e7615f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: gcc/testsuite/gcc.target/arm/thumb-ifcvt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Check that Thumb 16-bit shifts can be if-converted. */
22
/* { dg-do compile } */
33
/* { dg-require-effective-target arm_thumb2_ok } */
4-
/* { dg-options "-O2 -mthumb -mno-restrict-it" } */
4+
/* { dg-options "-O2 -mthumb -mtune=cortex-m4 -mno-restrict-it" } */
55

66
int
77
foo (int a, int b)

0 commit comments

Comments
 (0)