]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/loop-38.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-38.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cunrolli-details" } */
3 int a[10];
4 int b[11];
5 int q (void);
6 int
7 t(int n)
8 {
9 int i;
10 int sum = 0;
11 for (i=0;i<n;i++)
12 if (q())
13 sum+=a[i];
14 else
15 sum+=b[i];
16 return sum;
17 }
18 /* { dg-final { scan-tree-dump "Loop 1 iterates at most 11 times" "cunrolli" } } */