Add compile command to each testcase
[gcc-vect-testsuite.git] / slp-37.c
blob48642db96e71bc72b6c8454f894354ced7fab159
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include <stdlib.h>
5 #include "tree-vect.h"
7 #define N 128
9 typedef struct {
10 int a;
11 int b;
12 void *c;
13 } s1;
15 int
16 foo1 (s1 *arr)
18 int i;
19 s1 *ptr = arr;
21 /* Different constant types - not SLPable. The group size is not power of 2,
22 interleaving is not supported either. */
23 for (i = 0; i < N; i++)
25 ptr->a = 6;
26 ptr->b = 7;
27 ptr->c = NULL;
28 ptr++;
31 /* check results: */
32 for (i = 0; i < N; i++)
34 if (arr[i].a != 6
35 || arr[i].b != 7
36 || arr[i].c != NULL)
37 abort();
41 int main (void)
43 int i;
44 s1 arr1[N];
46 check_vect ();
48 for (i = 0; i < N; i++)
50 arr1[i].a = i;
51 arr1[i].b = i * 2;
52 arr1[i].c = (void *)arr1;
54 if (arr1[i].a == 178)
55 abort();
59 foo1 (arr1);
61 return 0;
64 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
65 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
66 /* { dg-final { cleanup-tree-dump "vect" } } */