https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77689
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-09-22
CC| |matz at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
First of all you need to make sure to have recent glibc installed to benefit
from
the vectorized math routines therein. Otherwise we cannot vectorize std::log.
Second, I think the if (i == 0) needs loop splitting (patch pending, author
CCed).
If you re-write the loop to
if (s != 0)
a[i] = b[i] * c[i];
for (unsigned i = 1; i < s; ++i)
a[i] = (b[i] + c[i]) * c[i-1] * std::log(i);
then GCC will be able to vectorize it. Confirmed because of that issue.