bpf: create modifier for mem operand for xchg and cmpxchg
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-prof / inliner-1.c
blob78f73e0fcfd930af57ab054b54dedecd8bde77c3
1 /* { dg-options "-O2 -fdump-tree-optimized -fgnu89-inline" } */
2 int a;
3 int b[100];
4 void abort (void);
6 inline void
7 cold_function ()
9 int i;
10 for (i = 0; i < 99; i++)
11 if (b[i] / (b[i+1] + 1))
12 abort ();
15 inline void
16 hot_function ()
18 int i;
19 for (i = 0; i < 99; i++)
20 if (b[i] / (b[i+1] + 1))
21 abort ();
24 int
25 main ()
27 int i;
28 for (i = 0; i < 1000000; i++)
30 if (a)
31 cold_function (); /* Should not be inlined. */
32 else
33 hot_function (); /* Should be inlined. */
35 return 0;
38 /* The call to hot_function should be inlined, while cold_function should
39 not be. Look for the "cold_function ();" call statement and not for
40 its declaration or other occurrences of the string in the dump. */
41 /* { dg-final-use { scan-tree-dump "cold_function ..;" "optimized"} } */
42 /* { dg-final-use { scan-tree-dump-not "hot_function ..;" "optimized"} } */