1 /* Test case to check if function foo gets split and the cold function
3 /* { dg-require-effective-target freorder } */
4 /* { dg-options "-O2 -freorder-blocks-and-partition -save-temps -fdump-tree-optimized-details-blocks" } */
6 #ifdef FOR_AUTOFDO_TESTING
7 #define MAXITER 1000000
14 const char *sarr
[SIZE
];
18 __attribute__((noinline
))
25 for (i
= 0; i
< SIZE
; i
++)
30 for (i
= 0; i
< SIZE
; i
++)
36 main (int argc
, char *argv
[])
41 for (i
= 0; i
< MAXITER
; i
++)
46 /* { dg-final-use-not-autofdo { scan-assembler "foo\[._\]+cold" { target *-*-linux* *-*-gnu* } } } */
47 /* { dg-final-use-not-autofdo { scan-assembler "size\[ \ta-zA-Z0-0\]+foo\[._\]+cold" { target *-*-linux* *-*-gnu* } } } */
48 /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */