2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / predict-12.c
blob1fd4d67c60ec7cc33eccf4bc8fb1986f7ecd9df3
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-profile_estimate" } */
3 int *a,n,m;
4 void test(void);
5 void
6 t(void)
8 int i,j;
9 for (i=0;i<n;i++)
10 if (a[i])
11 for (j=0;j<m;j++)
12 if (a[i+j])
13 t();
15 /* { dg-final { scan-tree-dump-times "loop guard with recursion" 1 "profile_estimate"} } */
16 /* { dg-final { scan-tree-dump-times "loop exit with recursion" 2 "profile_estimate"} } */
17 /* { dg-final { scan-tree-dump-times "recursive call" 1 "profile_estimate"} } */