OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / bb-slp-5.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include <stdio.h>
5 #include "tree-vect.h"
6
7 #define N 16 
8
9 unsigned short out[N];
10 unsigned short in[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
11
12 __attribute__ ((noinline)) int
13 main1 ()
14 {
15   int i;
16   unsigned short *pin = &in[0];
17   unsigned short *pout = &out[0];
18   
19   *pout++ = *pin++;
20   *pout++ = *pin++;
21   *pout++ = *pin++;
22   *pout++ = *pin++;
23   *pout++ = *pin++;
24   *pout++ = *pin++;
25   *pout++ = *pin++;
26   *pout++ = *pin++;
27
28   /* Check results.  */
29   if (out[0] != in[0]
30       || out[1] != in[1]
31       || out[2] != in[2]
32       || out[3] != in[3]
33       || out[4] != in[4]
34       || out[5] != in[5]
35       || out[6] != in[6]
36       || out[7] != in[7])
37     abort();
38
39   return 0;
40 }
41
42 int main (void)
43 {
44   check_vect ();
45
46   main1 ();
47
48   return 0;
49 }
50
51 /* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
52 /* { dg-final { cleanup-tree-dump "slp" } } */
53