LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-double-reduc-6-big-array.c
blob1d9dcdab5e9c09514a8427cd65c419e74962c9de
1 /* { dg-require-effective-target vect_int_mult } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define K 16
8 int in[2*K][K] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
9 int out[K];
10 int check_result[K];
12 __attribute__ ((noinline)) void
13 foo ()
15 int sum;
16 int i, j, k;
18 for (k = 0; k < K; k++)
20 sum = 1;
21 for (j = 0; j < K; j++)
22 for (i = 0; i < K; i++)
24 sum *= in[i+k][j];
25 asm volatile ("" ::: "memory");
27 check_result[k] = sum;
30 for (k = 0; k < K; k++)
32 sum = 1;
33 for (j = 0; j < K; j++)
34 for (i = 0; i < K; i++)
35 sum *= in[i+k][j];
36 out[k] = sum;
40 int main ()
42 int i, j, k;
44 check_vect ();
46 for (i = 0; i < 2*K; i++)
47 for (j = 0; j < K; j++)
48 in[i][j] = (i+2)/3;
50 foo ();
52 for (k = 0; k < K; k++)
53 if (out[k] != check_result[k])
54 abort ();
56 return 0;
59 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */