1 /* { dg-do compile } */
2 /* { dg-options "-O3 -funroll-loops -fno-tree-vectorize -fdump-tree-cunroll-details -fno-peel-loops" } */
6 typedef unsigned char e_u8
;
8 #define MAX(a,b) ((a)>=(b)?(a):(b))
11 static inline void bar1(e_u8 a
[4][N
], e_u8 b
[4][N
], btype n
)
15 for(i
= 0; i
< 4; i
++)
16 for(j
= 0; j
< n
; j
++)
20 static inline void bar2(e_u8 a
[4][N
], e_u8 b
[256], btype n
)
24 for(i
= 0; i
< 4; i
++)
25 for(j
= 0; j
< n
; j
++)
26 a
[i
][j
] = b
[a
[i
][j
]] ;
29 int foo1 (e_u8 a
[4][N
], int b1
, int b2
, e_u8 b
[M
+1][4][N
])
35 case 128: n
= 4; break;
36 case 192: n
= 6; break;
37 case 256: n
= 8; break;
38 default : return (-2);
41 case 128: m
= 10; break;
42 case 192: m
= 12; break;
43 case 256: m
= 14; break;
44 default : return (-3);
51 /* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 2 "cunroll" } } */
52 /* { dg-final { scan-tree-dump-times "loop with 7 iterations completely unrolled" 2 "cunroll" } } */