libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr37027.c
blobb747e2503a38d81e1118011632ad43d5b8358852
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-require-effective-target vect_perm } */
5 #include <stdarg.h>
7 struct mystr
9 int f1;
10 int f2;
13 struct mystr a[16];
14 struct mystr b[16];
15 int res1, res2;
18 void
19 foo (void)
21 int i;
22 int sum1 = 0;
23 int sum2 = 0;
25 for (i = 0; i < 16; i++)
27 sum1 += a[i].f1 + b[i].f1;
28 sum2 += a[i].f2 + b[i].f2;
31 res1 = sum1;
32 res2 = sum2;
35 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_add } } } */
36 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_add } } } */
37 /* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 0 "vect" } } */