Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-strided-store-a-u8-i2.c
blob26311a8bc805add50fc08a8d78b59a3a8cdf3e8b
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 64
8 typedef struct {
9 unsigned char a;
10 unsigned char b;
11 } s;
13 __attribute__ ((noinline)) int
14 main1 ()
16 s arr[N];
17 s *ptr = arr;
18 s res[N];
19 int i;
20 unsigned char a[N], b[N];
23 for (i = 0; i < N; i++)
25 a[i] = i;
26 b[i] = i * 2;
27 if (i%3 == 0)
28 a[i] = 10;
31 for (i = 0; i < N; i++)
33 res[i].a = a[i] + 3;
34 res[i].b = a[i] + b[i];
35 ptr++;
38 /* check results: */
39 for (i = 0; i < N; i++)
41 if (res[i].a != a[i] + 3
42 || res[i].b != a[i] + b[i])
43 abort ();
46 return 0;
49 int main (void)
51 check_vect ();
53 main1 ();
55 return 0;
58 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave || vect_strided2 } } } } */
59 /* { dg-final { cleanup-tree-dump "vect" } } */