http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57328

--- Comment #7 from Brian Taylor <spam.brian.taylor at gmail dot com> ---
(In reply to Jakub Jelinek from comment #5)
> But vectorization reorders the loop iterations, thus say if some value is
> sNaN, you'd get exceptions in different order.  So, I'm afraid without
> -ffast-math you can vectorize this only if the user says that the order of
> iterations doesn't matter (say using OpenMP 4.0 #pragma omp simd or Cilk+
> #pragma simd).

I'm not sure this is actually a problem (or perhaps there is a another bug),
because as I noted in the PR replacing min or max with a "functionally
equivalent" sequence of if statements allows vectorization.

Reply via email to