PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-nest-cycle-1.c
blobf52f30aa24e83768f9beb03fb2ac7b17f37e0b77
1 /* { dg-require-effective-target vect_float } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 float in[N] = {232,132,32,432,532,321,327,323,321,324,322,329,432,832,932,232};
9 float out[N];
10 float check_res[N] = {112,-4,-120,264,348,121,111,91,73,60,42,33,120,504,588,-128};
11 float a[2*N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
13 /* Outer-loop vectorization. */
15 __attribute__ ((noinline)) void
16 foo ()
18 int i, j;
19 float res;
21 for (i = 0; i < N; i++)
23 res = in[i];
25 for (j = 0; j < N; j++)
26 res = res - a[i+j];
28 out[i] = res;
31 for (i = 0; i < N; i++)
32 if (out[i] != check_res[i])
33 abort ();
37 int main ()
39 check_vect ();
41 foo();
43 return 0;
46 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */