This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/81706] std::sin vectorization bug


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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]