OSDN Git Service

* gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: Add
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-67.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 #define N 16
7
8 __attribute__ ((noinline))
9 int main1 (int a, int b)
10 {
11   int i, j;
12   int ia[N][4][N+8];
13
14   /* Multidimensional array. Aligned. The "inner" dimensions
15      are invariant in the inner loop. Store. 
16      Not vectorizable: unsupported operation. */
17   for (i = 0; i < N; i++)
18     {
19       for (j = 0; j < N; j++)
20         {
21            ia[i][1][j+8] = (a == b);
22         }
23     }
24
25   /* check results: */  
26   for (i = 0; i < N; i++)
27     {
28       for (j = 0; j < N; j++)
29         {
30            if (ia[i][1][j+8] != (a == b))
31               abort();
32         }
33     }
34
35   return 0;
36 }
37
38 int main (void)
39
40   check_vect ();
41
42   return main1 (2 ,7);
43 }
44
45 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
46 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
47 /* { dg-final { cleanup-tree-dump "vect" } } */