1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "--param vect-max-version-for-alias-checks=0" } */
4
5 typedef struct
6 {
7 short real;
8 short imag;
9 } complex16_t;
10
11 void
12 libvector_AccSquareNorm_ref (unsigned int *acc,
13 const complex16_t *x, unsigned len)
14 {
15 unsigned i;
16 for (i = 0; i < len; i++)
17 acc[i] += ((unsigned int)((int)x[i].real * x[i].real))
18 + ((unsigned int)((int)x[i].imag * x[i].imag));
19 }
20
21 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_extract_even_odd } } } } */