Re: [PATCH v2] [x86] Fix incorrect _mm_cvtsbh_ss.

2022-11-24 Thread Hongtao Liu via Gcc-patches
On Thu, Nov 24, 2022 at 4:53 PM Jakub Jelinek wrote: > > On Thu, Nov 24, 2022 at 09:22:00AM +0800, liuhongt via Gcc-patches wrote: > > --- a/gcc/config/i386/i386.md > > +++ b/gcc/config/i386/i386.md > > @@ -130,6 +130,7 @@ (define_c_enum "unspec" [ > >;; For AVX/AVX512F support > >UNSPEC_S

Re: [PATCH v2] [x86] Fix incorrect _mm_cvtsbh_ss.

2022-11-24 Thread Jakub Jelinek via Gcc-patches
On Thu, Nov 24, 2022 at 09:22:00AM +0800, liuhongt via Gcc-patches wrote: > --- a/gcc/config/i386/i386.md > +++ b/gcc/config/i386/i386.md > @@ -130,6 +130,7 @@ (define_c_enum "unspec" [ >;; For AVX/AVX512F support >UNSPEC_SCALEF >UNSPEC_PCMP > + UNSPEC_CVTBFSF > >;; Generic math

[PATCH v2] [x86] Fix incorrect _mm_cvtsbh_ss.

2022-11-23 Thread liuhongt via Gcc-patches
After supporting real __bf16, the implementation of _mm_cvtsbh_ss went wrong. The patch add a builtin to generate pslld for the intrinsic, also extendbfsf2 is supported with pslld when !flag_signaling_nans && !HONOR_NANS (BFmode). truncsfbf2 is supported with vcvtneps2bf16 when !flag_signaling_na