Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / vect / vect-98.c
blobe1548bbc73b943b5f6be56163a5546541d890366
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 4
7 #define DOT4( a, b ) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] )
9 int main1 (int ia[][N])
11 int i, j;
12 int ib[N] = {0,3,6,9};
13 int ic[N][N];
15 for (i = 0; i < N; i++)
17 ic[0][i] = DOT4 (ia[i], ib);
20 /* check results: */
21 for (i = 0; i < N; i++)
23 if (ic[0][i] != DOT4 (ia[i], ib))
24 abort();
27 return 0;
30 int main (void)
32 int ia[N][N] = {{1,2,3,4},{2,3,5,7},{2,4,6,8},{22,43,55,77}};
34 check_vect ();
36 return main1 (ia);
39 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
40 /* { dg-final { scan-tree-dump-times "not vectorized: complicated access pattern" 1 "vect" } } */
41 /* { dg-final { cleanup-tree-dump "vect" } } */