[Bug c++/107726] Multiple bugs related to __gnu__::__target__

2022-11-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107726

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
 Ever confirmed|0   |1
   Last reconfirmed||2022-11-16

--- Comment #2 from Andrew Pinski  ---
We have tests for multiversioning and they are passing with BFD ld.

Also multiversioning requires ifunc support which is not implemented for
Windows (I don't know how clang implements theirs, maybe they do a check at the
beginging of the function to see if a function pointer was assigned).

For 1, can you provide a full testcase which is failing?

[Bug c++/107726] Multiple bugs related to __gnu__::__target__

2022-11-16 Thread unlvsur at live dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107726

--- Comment #1 from cqwrteur  ---
#if __has_cpp_attribute(__gnu__::__target__) && defined(__SSE2__) &&
!defined(__AVX2__)
[[__gnu__::__target__("default")]]
#elif __has_cpp_attribute(__gnu__::__flatten__)
[[__gnu__::__flatten__]]
#endif
inline void sha512_runtime_routine(std::uint_least64_t* __restrict
state,std::byte const* __restrict blocks_start,std::byte const* __restrict
blocks_last) noexcept;

#if __has_cpp_attribute(__gnu__::__target__) && defined(__SSE2__) &&
!defined(__AVX2__)
[[__gnu__::__target__("avx2")]]
#elif __has_cpp_attribute(__gnu__::__flatten__)
[[__gnu__::__flatten__]]
#endif
inline void sha512_runtime_routine(std::uint_least64_t* __restrict
state,std::byte const* __restrict blocks_start,std::byte const* __restrict
blocks_last) noexcept;

Something like this.