This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/81706] std::sin vectorization bug
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Aug 2017 20:15:54 +0000
- Subject: [Bug libstdc++/81706] std::sin vectorization bug
- Auto-submitted: auto-generated
- References: <bug-81706-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81706
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> The C library sin is vectorized by being appropriately annotated with OpenMP
> SIMD attributes. This isn't the case for the libstdc++ variant which ends
> up calling
> __builtin_sinf:
>
> using ::sin;
>
> inline float
> sin(float __x)
> { return __builtin_sinf(__x); }
>
> why the using ::sin and then still dispatching to the builtin?
The using directive makes ::sin(double) available as std::sin(double), that's
orthogonal to calling __builtin_sinf for std::sin(float).