Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / gcc.dg / vect / no-section-anchors-vect-outer-4h.c
blobfc99122b2032d7f1a7701a13fa338c58d45d1add
1 /* { dg-require-effective-target vect_int } */
2 #include <stdarg.h>
3 #include "tree-vect.h"
6 #define N 40
7 #define M 128
8 unsigned short a[M][N];
9 unsigned int out[N];
11 /* Outer-loop vectorization. */
13 __attribute__ ((noinline))
14 void
15 foo (){
16 int i,j;
17 unsigned int diff;
19 for (i = 0; i < N; i++) {
20 for (j = 0; j < M; j++) {
21 a[j][i] = 4;
23 out[i]=5;
27 int main (void)
29 int i, j;
30 check_vect ();
32 foo ();
34 for (i = 0; i < N; i++) {
35 for (j = 0; j < M; j++) {
36 if (a[j][i] != 4)
37 abort ();
39 if (out[i] != 5)
40 abort ();
43 return 0;
47 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
48 /* { dg-final { cleanup-tree-dump "vect" } } */