1 /* { dg-do compile } */
4 #define SPLAT76 ((vector unsigned char)\
5 {0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3})
6 #define SPLAT54 ((vector unsigned char)\
7 {4,5,6,7,4,5,6,7,4,5,6,7,4,5,6,7})
8 #define SPLAT32 ((vector unsigned char)\
9 {8,9,10,11,8,9,10,11,8,9,10,11,8,9,10,11})
10 #define SPLAT10 ((vector unsigned char)\
11 {12,13,14,15,12,13,14,15,12,13,14,15,12,13,14,15})
12 #define INTERLEAVE ((vector unsigned char)\
13 {0,1,16,17,4,5,20,21,8,9,24,25,12,13,28,29})
15 long real_32_manytaps (long ntaps
, vector
signed short *c
, long ndat
,
16 vector
signed short *x
, vector
signed short *y
)
18 long i
, j
, op
, ndatavec
, ncoefvec
;
19 vector
signed short x0
, x1
;
20 vector
signed short coef
;
21 vector
signed short cr10
, cr32
, cr54
, cr76
;
22 vector
signed int y_even
, y_odd
;
23 vector
signed short *x1p
;
27 ncoefvec
= ntaps
>> 3;
29 for (i
= 0; i
< ndatavec
; i
+= 1) {
32 y_even
= ((vector
signed int){0x8000,0x8000,0x8000,0x8000});
33 y_odd
= ((vector
signed int){0x8000,0x8000,0x8000,0x8000});
43 cr10
= vec_perm(coef
, coef
, SPLAT10
);
44 y_odd
= vec_msums(cr10
, x1
, y_odd
);
45 y_even
= vec_msums(cr10
, vec_sld(x0
, x1
, 14), y_even
);
47 cr32
= vec_perm(coef
, coef
, SPLAT32
);
48 y_odd
= vec_msums(cr32
, vec_sld(x0
, x1
, 12), y_odd
);
49 y_even
= vec_msums(cr32
, vec_sld(x0
, x1
, 10), y_even
);
51 cr54
= vec_perm(coef
, coef
, SPLAT54
);
52 y_odd
= vec_msums(cr54
, vec_sld(x0
, x1
, 8), y_odd
);
53 y_even
= vec_msums(cr54
, vec_sld(x0
, x1
, 6), y_even
);
55 cr76
= vec_perm(coef
, coef
, SPLAT76
);
56 y_odd
= vec_msums(cr76
, vec_sld(x0
, x1
, 4), y_odd
);
57 y_even
= vec_msums(cr76
, vec_sld(x0
, x1
, 2), y_even
);
61 } while (++j
< ncoefvec
);
62 y
[op
++] = (vector
signed short) vec_perm(y_even
, y_odd
, INTERLEAVE
);