1 /* { dg-require-effective-target vect_int } */
15 static int a
[N
][N
] = {{1,2,3,11},{4,5,6,12},{7,8,9,13},{34,45,67,83}};
16 static int b
[N
][N
] = {{17,28,15,23},{0,2,3,24},{4,31,82,25},{29,31,432,256}};
17 static int c
[N
][N
] = {{1,2,3,11},{4,9,13,34},{45,67,83,13},{34,45,67,83}};
21 __attribute__ ((noinline
))
25 p
= (struct extraction
*) malloc (sizeof (struct extraction
));
27 for (i
= 0; i
< N
; i
++)
29 for (j
= 0; j
< N
; j
++)
33 /* Because Y is volatile, the compiler cannot move this check out
36 abort (); /* to avoid vectorization */
40 /* Vectorizable: distance > number of iterations. */
41 for (i
= 1; i
< N
; i
++)
43 for (j
= 0; j
< N
; j
++)
45 *((int *)p
+ x
+ i
+ j
) = *((int *)p
+ x
+ i
+ j
+ 5);
50 for (i
= 0; i
< N
; i
++)
52 for (j
= 0; j
< N
; j
++)
54 if (p
->a
[i
][j
] != c
[i
][j
])
68 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
69 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
70 /* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 0 "vect" } } */
71 /* { dg-final { cleanup-tree-dump "vect" } } */