testsuite: Revert to the original version of pr100056.c
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / slp-multitypes-1.c
blob605f6ab8ba638175d557145c82f2b78c30eb5835
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];
15 for (i = 0; i < N; i++)
17 sout[i*4] = 8;
18 sout[i*4 + 1] = 18;
19 sout[i*4 + 2] = 28;
20 sout[i*4 + 3] = 38;
22 iout[i*4] = 8;
23 iout[i*4 + 1] = 18;
24 iout[i*4 + 2] = 28;
25 iout[i*4 + 3] = 38;
28 /* check results: */
29 #pragma GCC novector
30 for (i = 0; i < N; i++)
32 if (sout[i*4] != 8
33 || sout[i*4 + 1] != 18
34 || sout[i*4 + 2] != 28
35 || sout[i*4 + 3] != 38
36 || iout[i*4] != 8
37 || iout[i*4 + 1] != 18
38 || iout[i*4 + 2] != 28
39 || iout[i*4 + 3] != 38)
40 abort ();
43 return 0;
46 int main (void)
48 check_vect ();
50 main1 ();
52 return 0;
55 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
56 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */