libstdc++: Remove unused alias template in std::optional
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-multitypes-12.c
blob13119822200fef23a96e920bde8ca968f0a09f84
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 __attribute__ ((noinline)) int
9 main1 ()
11 int i;
12 unsigned short sout[N*8];
13 unsigned int iout[N*8];
14 unsigned char cout[N*8];
16 for (i = 0; i < N; i++)
18 sout[i*4] = 8;
19 sout[i*4 + 1] = 18;
20 sout[i*4 + 2] = 28;
21 sout[i*4 + 3] = 38;
23 iout[i*4] = 8;
24 iout[i*4 + 1] = 18;
25 iout[i*4 + 2] = 28;
26 iout[i*4 + 3] = 38;
28 cout[i*4] = 1;
29 cout[i*4 + 1] = 2;
30 cout[i*4 + 2] = 3;
31 cout[i*4 + 3] = 4;
34 /* check results: */
35 #pragma GCC novector
36 for (i = 0; i < N; i++)
38 if (sout[i*4] != 8
39 || sout[i*4 + 1] != 18
40 || sout[i*4 + 2] != 28
41 || sout[i*4 + 3] != 38
42 || iout[i*4] != 8
43 || iout[i*4 + 1] != 18
44 || iout[i*4 + 2] != 28
45 || iout[i*4 + 3] != 38
46 || cout[i*4] != 1
47 || cout[i*4 + 1] != 2
48 || cout[i*4 + 2] != 3
49 || cout[i*4 + 3] != 4)
50 abort ();
53 return 0;
56 int main (void)
58 check_vect ();
60 main1 ();
62 return 0;
65 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
66 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */