2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / unroll-7.c
blob70b92ba080fff92919effc73e972fe75778b0ccd
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-rtl-loop2_unroll -funroll-loops" } */
3 /* { dg-require-effective-target int32plus } */
5 int t(int *a)
7 int i;
8 for (i=0;i<1000000;i++)
9 a[i]++;
11 /* { dg-final { scan-rtl-dump "Unrolled loop" "loop2_unroll" } } */
12 /* { dg-final { scan-rtl-dump "number of iterations: .const_int 999999" "loop2_unroll" } } */
13 /* { dg-final { scan-rtl-dump "upper bound: 999999" "loop2_unroll" } } */
14 /* { dg-final { scan-rtl-dump "realistic bound: 999999" "loop2_unroll" } } */
15 /* { dg-final { scan-rtl-dump "Considering unrolling loop with constant number of iterations" "loop2_unroll" } } */
16 /* { dg-final { scan-rtl-dump-not "Invalid sum" "loop2_unroll" } } */