Add compile command to each testcase
[gcc-vect-testsuite.git] / slp-multitypes-12.c
blobe9a2c6d4bf6129a700c5e34e7aeb4141b3adfca9
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 for (i = 0; i < N; i++)
37 if (sout[i*4] != 8
38 || sout[i*4 + 1] != 18
39 || sout[i*4 + 2] != 28
40 || sout[i*4 + 3] != 38
41 || iout[i*4] != 8
42 || iout[i*4 + 1] != 18
43 || iout[i*4 + 2] != 28
44 || iout[i*4 + 3] != 38
45 || cout[i*4] != 1
46 || cout[i*4 + 1] != 2
47 || cout[i*4 + 2] != 3
48 || cout[i*4 + 3] != 4)
49 abort ();
52 return 0;
55 int main (void)
57 check_vect ();
59 main1 ();
61 return 0;
64 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
65 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" } } */
66 /* { dg-final { cleanup-tree-dump "vect" } } */