1 /* { dg-do compile } */
2 /* { dg-options "-O2 -funroll-all-loops -fdump-rtl-loop2_unroll-details -fdump-tree-cunrolli-details" } */
3
4 extern void bar (int);
5
6 int j;
7
test(void)8 void test (void)
9 {
10 #pragma GCC unroll 0
11 #pragma GCC ivdep
12 for (unsigned long i = 1; i <= 3; ++i)
13 bar(i);
14
15 #pragma GCC ivdep
16 #pragma GCC unroll 0
17 for (unsigned long i = 1; i <= j; ++i)
18 bar(i);
19
20 /* { dg-final { scan-tree-dump "Not unrolling loop .: user didn't want it unrolled completely" "cunrolli" } } */
21 /* { dg-final { scan-rtl-dump-times "Not unrolling loop, user didn't want it unrolled" 2 "loop2_unroll" } } */
22 }
23