Apply maximum nunits for BB SLP
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-4.c
blob293b0e3405e850acfe30d71725fb591c9498ba18
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++;
21 if (i)
22 __asm__ volatile ("" : : : "memory");
24 /* Check results. */
25 if (out[0] != in[0]
26 || out[1] != in[1])
27 abort();
29 return 0;
32 int main (void)
34 check_vect ();
36 main1 ();
38 return 0;
41 /* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */