Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/vect/vect-125.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-require-effective-target vect_int } */ /* { dg-require-effective-target vect_int_mult } */ /* { dg-require-effective-target vect_pack_trunc } */ /* { dg-require-effective-target vect_unpack } */ void train(short *t, short *w, int n, int err) { n=(n+7)&-8; for (int i=0; i<n; ++i) { int wt=w[i]+((t[i]*err*2>>16)+1>>1); if (wt<-32768) wt=-32768; if (wt>32767) wt=32767; w[i]=wt; } } /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_int_min_max } } } */