Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr37027.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-require-effective-target vect_perm } */
4
5 #include <stdarg.h>
6
7 struct mystr
8 {
9 int f1;
10 int f2;
11 };
12
13 struct mystr a[16];
14 struct mystr b[16];
15 int res1, res2;
16
17
18 void
19 foo (void)
20 {
21 int i;
22 int sum1 = 0;
23 int sum2 = 0;
24
25 for (i = 0; i < 16; i++)
26 {
27 sum1 += a[i].f1 + b[i].f1;
28 sum2 += a[i].f2 + b[i].f2;
29 }
30
31 res1 = sum1;
32 res2 = sum2;
33 }
34
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" } } */