2013-05-06 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / attr-hotcold-2.c
blobd0225ec164e915639455e7a6472fdabc508f3239
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-profile_estimate-blocks-details" } */
4 void g(void);
5 void h(void);
6 void f(int x, int y)
8 if (x) goto A;
9 if (y) goto B;
10 return;
12 A: __attribute__((cold))
13 g();
14 return;
16 B: __attribute__((hot))
17 h();
18 return;
21 /* { dg-final { scan-ipa-dump-times "block 4, loop depth 0, count 0, freq 1\[^0-9\]" 1 "profile_estimate" } } */
23 /* Note: we're attempting to match some number > 6000, i.e. > 60%.
24 The exact number ought to be tweekable without having to juggle
25 the testcase around too much. */
26 /* { dg-final { scan-ipa-dump-times "block 5, loop depth 0, count 0, freq \[6-9\]\[0-9\]\[0-9\]\[0-9\]" 1 "profile_estimate" } } */
28 /* { dg-final { cleanup-ipa-dump "profile_estimate" } } */