[Bug libstdc++/81706] std::sin vectorization bug
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 4 10:35:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81706
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 41923
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41923&action=edit
gcc8-pr81706.patch
The reason for why cmath does this is that C++ wants to have sin overloads.
And the problem is that we have the simd attributes only on ::sinf, ::sin etc.,
but not on __builtin_sinf, __builtin_sin etc.
So, either we change libstdc++ like with this untested patch, or change the
compiler, so that when seeing a matching decl for a builtin which has simd
attribute on it, we duplicate the attribute to the __builtin_* decl too.
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Created attachment 41923 [details]
> gcc8-pr81706.patch
>
> The reason for why cmath does this is that C++ wants to have sin overloads.
> And the problem is that we have the simd attributes only on ::sinf, ::sin
> etc., but not on __builtin_sinf, __builtin_sin etc.
> So, either we change libstdc++ like with this untested patch, or change the
> compiler, so that when seeing a matching decl for a builtin which has simd
> attribute on it, we duplicate the attribute to the __builtin_* decl too.
I'd prefer the attached patch to libstdc++ (which is incomplete of course).
More information about the Gcc-bugs
mailing list