2013-06-03 Teresa Johnson <tejohnson@google.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-5.c
blobcd1679e981d313799629a43d059613582f68548f
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 __attribute__ ((noinline)) int
12 main1 ()
14 int i;
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++;
27 /* Check results. */
28 if (out[0] != in[0]
29 || out[1] != in[1]
30 || out[2] != in[2]
31 || out[3] != in[3]
32 || out[4] != in[4]
33 || out[5] != in[5]
34 || out[6] != in[6]
35 || out[7] != in[7])
36 abort();
38 return 0;
41 int main (void)
43 check_vect ();
45 main1 ();
47 return 0;
50 /* { dg-final { scan-tree-dump-times "Vectorized basic-block" 1 "slp" } } */
51 /* { dg-final { cleanup-tree-dump "slp" } } */