| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target arm_cpu_cortex_m7_ok } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
/* { dg-add-options arm_cpu_cortex_m7 } */ |
| 5 |
|
| 6 |
int test (int a, int b) |
| 7 |
{ |
| 8 |
int r; |
| 9 |
if (a > 10) |
| 10 |
{ |
| 11 |
r = a - b; |
| 12 |
r += 10; |
| 13 |
} |
| 14 |
else |
| 15 |
{ |
| 16 |
r = b - a; |
| 17 |
r -= 7; |
| 18 |
} |
| 19 |
if (r > 0) |
| 20 |
r -= 3; |
| 21 |
return r; |
| 22 |
} |
| 23 |
/* Ensure there is no IT block with more than 2 instructions, ie. we only allow |
| 24 |
IT, ITT and ITE. */ |
| 25 |
/* { dg-final { scan-assembler-not "\\sit\[te\]{2}" } } */ |