1 /* { dg-do compile } */
3 /* { dg-options "-O2 -funroll-loops --param max-unroll-times=8 -fpredictive-commoning -fdump-tree-pcom-details" } */
9 __attribute__ ((noinline
))
16 for (i
= 2; i
< 1000; i
++)
17 fib
[i
] = (fib
[i
-1] + fib
[i
- 2]) & 0xffff;
22 __attribute__ ((noinline
))
23 void count_averages(void)
27 for (i
= 1; i
< 999; i
++)
28 avg
[i
] = ((fib
[i
- 1] + fib
[i
] + fib
[i
+ 1]) / 3) & 0xffff;
36 if (fib
[19] != 4181 || avg
[19] != 4510)
39 if (fib
[999] != 162 || avg
[998] != 21953)
45 /* Verify that both loops were transformed and unrolled. */
46 /* { dg-final { scan-tree-dump-times "Unrolling 2 times." 2 "pcom"} } */
47 /* { dg-final { cleanup-tree-dump "pcom" } } */