Debian Codegraph @

gcc/testsuite/gcc.dg/tree-prof/loop-split-1.c

raw
1 /* { dg-options "-O3 -fdump-tree-lsplit-details-blocks -fdump-tree-optimized-details-blocks" } */
2
3
4 void
5 __attribute__ ((noinline,noipa))
6 do_something()
7 {
8 }
9 void
10 __attribute__ ((noinline,noipa))
11 do_something2()
12 {
13 }
14
15 __attribute__ ((noinline,noipa))
16 void test1 (int n, int ga)
17 {
18 for (int i = 0; i < 200; i++)
19 if (i < 150)
20 do_something ();
21 else
22 do_something2 ();
23 }
24 int
25 main(int, char **)
26 {
27 for (int i = 0 ; i < 1000; i++)
28 test1(10, 10);
29 return 0;
30 }
31 /* { dg-final-use-not-autofdo { scan-tree-dump-times "Loop split" 1 "lsplit" } } */
32 /* { dg-final-use-not-autofdo { scan-tree-dump-times "Invalid sum" 0 "lsplit" } } */
33 /* { dg-final-use-not-autofdo { scan-tree-dump-times "Invalid sum" 0 "optimized" } } */