https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61194

--- Comment #7 from vincenzo Innocente <vincenzo.innocente at cern dot ch> ---
great!

the original version (that vectorized in 4.8.1)
void barX() {
  for (int i=0; i<1024; ++i) {
    k[i] = (x[i]>0) & (w[i]<y[i]);
    z[i] = (k[i]) ? z[i] : y[i];
 }
}

does not vectorize yet.

On the other hand I am very happy to see
void bar() {
  for (int i=0; i<1024; ++i) {
    auto c = ( (x[i]>0) & (w[i]<y[i])) | (y[i]>0.5f);
    z[i] = c ? y[i] : z[i];
 }
}
vectorized
if (c) z[i] = y[i];
does not even with -ftree-loop-if-convert-stores
not a real issue at least for what I am concerned

Reply via email to