Debian Codegraph @

gcc/testsuite/gcc.target/arm/its-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_cpu_cortex_m3_ok } */
3 /* { dg-options "-O2" } */
4 /* { dg-add-options arm_cpu_cortex_m3 } */
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 an IT block with at least 2 instructions. */
24 /* { dg-final { scan-assembler "\\sit\[te\]{2}" } } */