1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-require-effective-target vect_int_mult } */
4 /* { dg-require-effective-target vect_pack_trunc } */
5 /* { dg-require-effective-target vect_unpack } */
7 void train(short *t
, short *w
, int n
, int err
)
10 for (int i
=0; i
<n
; ++i
)
12 int wt
=w
[i
]+((t
[i
]*err
*2>>16)+1>>1);
13 if (wt
<-32768) wt
=-32768;
14 if (wt
>32767) wt
=32767;
19 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_min_max } } } */