* doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr61743-1.c
blobf7cbda6832474e881aaae36ec2c82b5fd65d2c68
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -funroll-loops -fno-tree-vectorize -fdump-tree-cunroll-details -fdump-tree-cunrolli-details -fno-peel-loops" } */
4 #define N 8
5 #define M 14
6 typedef unsigned char e_u8;
7 e_u8 x[256];
8 #define MAX(a,b) ((a)>=(b)?(a):(b))
9 #define btype int
11 static inline void bar1(e_u8 a[4][N], e_u8 b[4][N], btype n)
13 int i, j;
15 for(i = 0; i < 4; i++)
16 for(j = 0; j < n; j++)
17 a[i][j] ^= b[i][j];
20 static inline void bar2(e_u8 a[4][N], e_u8 b[256], btype n)
22 int i, j;
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])
31 btype n;
32 int r, m;
34 switch (b2) {
35 case 128: n = 4; break;
36 case 192: n = 6; break;
37 case 256: n = 8; break;
38 default : return (-2);
40 switch (MAX(b1,b2)) {
41 case 128: m = 10; break;
42 case 192: m = 12; break;
43 case 256: m = 14; break;
44 default : return (-3);
46 bar1(a,b[m],n);
47 bar2(a,x,n);
48 return 0;
51 /* { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 8 "cunroll" } } */
52 /* { dg-final { scan-tree-dump-times "loop with 8 iterations completely unrolled" 2 "cunrolli" } } */