openmp: Add testcases for omp_max_vf
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-19.c
blob7e3ccb4847fb874ba6e6b3ca780420234b47fcff
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 unsigned short out[N];
9 unsigned short in[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
11 int i;
12 __attribute__ ((noinline)) int
13 main1 ()
15 unsigned short *pin = &in[0];
16 unsigned short *pout = &out[0];
18 *pout++ = *pin++;
19 *pout++ = *pin++;
20 *pout++ = *pin++;
21 *pout++ = *pin++;
22 *pout++ = *pin++;
23 *pout++ = *pin++;
24 *pout++ = *pin++;
25 *pout++ = *pin++;
26 *pout++ = *pin++;
28 if (i)
29 __asm__ volatile ("" : : : "memory");
31 /* Check results. */
32 if (out[0] != in[0]
33 || out[1] != in[1]
34 || out[2] != in[2]
35 || out[3] != in[3]
36 || out[4] != in[4]
37 || out[5] != in[5]
38 || out[6] != in[6]
39 || out[7] != in[7]
40 || out[8] != in[8])
41 abort();
43 return 0;
46 int main (void)
48 check_vect ();
50 main1 ();
52 return 0;
55 /* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp2" } } */