OSDN Git Service

PR tree-optimization/40542
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / bb-slp-19.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   /* A group of 9 shorts - unsupported for now.  */
20   *pout++ = *pin++;
21   *pout++ = *pin++;
22   *pout++ = *pin++;
23   *pout++ = *pin++;
24   *pout++ = *pin++;
25   *pout++ = *pin++;
26   *pout++ = *pin++;
27   *pout++ = *pin++;
28   *pout++ = *pin++;
29
30   /* Check results.  */
31   if (out[0] != in[0]
32       || out[1] != in[1]
33       || out[2] != in[2]
34       || out[3] != in[3]
35       || out[4] != in[4]
36       || out[5] != in[5]
37       || out[6] != in[6]
38       || out[7] != in[7]
39       || out[8] != in[8])
40     abort();
41
42   return 0;
43 }
44
45 int main (void)
46 {
47   check_vect ();
48
49   main1 ();
50
51   return 0;
52 }
53
54 /* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp"  { xfail *-*-* }  } } */
55 /* { dg-final { cleanup-tree-dump "slp" } } */
56