[Bug c++/85077] [8 Regression] V[248][SD]F abs not optimized to

kretz at kde dot org gcc-bugzilla@gcc.gnu.org
Tue Mar 27 20:08:00 GMT 2018


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

--- Comment #8 from Matthias Kretz <kretz at kde dot org> ---
Thanks! FWIW my abs implementation now uses:

template <class T, size_t N>
[[gnu::optimize("finite-math-only,no-signed-zeros")]]
constexpr Storage<T, N> abs(Storage<T, N> v)
{
    return v.d < 0 ? -v.d : v.d;
}


More information about the Gcc-bugs mailing list