OSDN Git Service

PR rtl-optimization/52139
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / ipa-split-5.c
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-fnsplit -fdump-tree-optimized" } */
3
4 struct a {int a,b;};
5 struct a make_me_big (int a);
6 struct a split_me (int a)
7 {
8   struct a retval;
9   if (__builtin_expect (a!=0,1))
10     {
11       retval.a = 0;
12       retval.b = 0;
13       return retval;
14     }
15   else
16     {
17       struct a retval = make_me_big (a);
18       retval = make_me_big (a);
19       retval = make_me_big (a);
20       retval = make_me_big (a);
21       retval = make_me_big (a);
22       retval = make_me_big (a);
23       return retval;
24     }
25 }
26 int val;
27 test()
28 {
29   split_me (val);
30   split_me (val);
31   split_me (val);
32   split_me (val);
33 }
34 /* { dg-final { scan-tree-dump-times "Splitting function" 1 "fnsplit"} } */
35 /* { dg-final { cleanup-tree-dump "fnsplit" } } */
36 /* { dg-final { scan-tree-dump "part" "optimized"} } */
37 /* { dg-final { cleanup-tree-dump "optimized" } } */