openmp: Fix signed/unsigned warning
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-outer-3a-big-array.c
blob7ae931e39be5a4e6da45242b415459e073f1384a
1 /* { dg-require-effective-target vect_float } */
2 #include <stdarg.h>
3 #include "tree-vect.h"
5 #define N 320
6 float image[N][N+1] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7 float out[N];
9 /* Outer-loop vectorization with misaliged accesses in the inner-loop. */
11 __attribute__ ((noinline)) void
12 foo (){
13 int i,j;
14 float diff;
16 for (i = 0; i < N; i++) {
17 diff = 0;
18 for (j = 0; j < N; j++) {
19 diff += image[j][i];
21 out[i]=diff;
25 int main (void)
27 check_vect ();
28 int i, j;
29 float diff;
31 for (i = 0; i < N; i++) {
32 for (j = 0; j < N; j++) {
33 image[i][j]=i+j;
37 foo ();
39 #pragma GCC novector
40 for (i = 0; i < N; i++) {
41 diff = 0;
42 for (j = 0; j < N; j++) {
43 diff += image[j][i];
45 if (out[i] != diff)
46 abort ();
49 return 0;
52 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
53 /* { dg-final { scan-tree-dump-times "step doesn't divide the vector alignment" 1 "vect" { xfail vect_element_align_preferred } } } */