Debian Codegraph @

gcc/testsuite/gcc.target/arm/epilog-1.c

raw
1 /* Register liveness information from epilgoue enables peephole optimization. */
2 /* { dg-do compile } */
3 /* { dg-options "-mthumb -Os" } */
4 /* { dg-require-effective-target arm_thumb2_ok } */
5 /* { dg-final { check-function-bodies "**" "" } } */
6
7 volatile int g_k;
8 extern void bar(int, int, int, int);
9
10 /*
11 ** foo:
12 ** ...
13 ** (
14
15 Below block is for non-armv8.1-m.main
16 ** lsls r[0-9]+, r[0-9]+, #29
17 ** it mi
18 ** addmi r2, r2, #1
19
20 ** |
21
22 Below block is for armv8.1-m.main
23 ** tst r[0-9]+, #4
24 ** csinc r2, r2, r2, eq
25
26 ** )
27 ** bl bar
28 ** ...
29 */
30 int foo(int a, int b, int c, int d)
31 {
32 if (g_k & 4) c++;
33 bar (a, b, c, d);
34 return 0;
35 }