2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / unroll-3.c
blob10bf59b9a2e72ea879d1a8fb3eee02f2d85f6811
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cunrolli-details -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunrolli=foo -fenable-tree-cunrolli=foo" } */
4 unsigned a[100], b[100];
5 inline void bar()
7 a[10] = b[10];
10 int foo(void)
12 int i;
13 bar();
14 for (i = 0; i < 2; i++)
16 a[i]= b[i] + 1;
18 return 1;
21 int foo2(void)
23 int i;
24 for (i = 0; i < 2; i++)
26 a[i]= b[i] + 1;
28 return 1;
31 /* { dg-final { scan-tree-dump-times "loop with 2 iterations completely unrolled" 1 "cunrolli" } } */