]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
i386.c (make_resolver_func): Update.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / attr-hotcold-2.c
CommitLineData
e45abe1f 1/* { dg-do compile } */
d1fcc2bd 2/* { dg-options "-O2 -fdump-tree-profile_estimate-blocks-details" } */
e45abe1f
RH
3
4void g(void);
5void h(void);
6void f(int x, int y)
7{
8 if (x) goto A;
9 if (y) goto B;
10 return;
11
12 A: __attribute__((cold))
13 g();
14 return;
15
16 B: __attribute__((hot))
17 h();
18 return;
19}
20
67785479
RL
21/* { dg-final { scan-tree-dump-times "hot label heuristics" 1 "profile_estimate" } } */
22/* { dg-final { scan-tree-dump-times "cold label heuristics" 1 "profile_estimate" } } */
3995f3a2 23/* { dg-final { scan-tree-dump-times "block 4, loop depth 0, freq \[1-4\]\[^0-9\]" 3 "profile_estimate" } } */
e45abe1f
RH
24
25/* Note: we're attempting to match some number > 6000, i.e. > 60%.
26 The exact number ought to be tweekable without having to juggle
27 the testcase around too much. */
3995f3a2 28/* { dg-final { scan-tree-dump-times "block 5, loop depth 0, freq \[6-9\]\[0-9\]\[0-9\]\[0-9\]" 3 "profile_estimate" } } */