blob: f3e2e3e4c1302ad98393a6dc44d8b50a91ed1d43 [file] [log] [blame]
// { dg-do compile }
// { dg-require-effective-target vect_float }
// { dg-additional-options "-ffast-math" }
float px[1024];
float xx, vv;
unsigned int N=1024;
void ok() {
for (unsigned j=0U; j<N; ++j) {
float ax = px[j]-xx;
vv-=ax;
}
}
void noOk() {
for (unsigned j=0U; j<N; ++j) {
float ax = xx-px[j];
vv+=ax;
}
}
// { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } }