1 /* { dg-do compile } */
2 /* { dg-additional-options "-ffast-math -fdump-tree-optimized" } */
3 /* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */
4 /* { dg-require-effective-target vect_double } */
5 /* { dg-require-effective-target vect_unpack } */
6 /* { dg-require-effective-target vect_intdouble_cvt } */
7 /* { dg-require-effective-target vect_perm } */
21 struct dpixels results
={};
22 for (int u
=0; u
<1000*16;u
++,k
--)
24 results
.a
+= *k
*pixels
[u
].a
;
25 results
.b
+= *k
*pixels
[u
].b
;
26 results
.c
+= *k
*pixels
[u
].c
;
27 results
.d
+= *k
*pixels
[u
].d
;
29 return results
.a
+results
.b
*2+results
.c
*3+results
.d
*4;
32 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */
33 /* { dg-final { scan-tree-dump-times "VEC_PERM" 4 "optimized" { target x86_64-*-* i?86-*-* } } } */