Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-19 Thread Richard Biener via Gcc-patches
On Thu, 19 Aug 2021, Richard Sandiford wrote: > Richard Biener writes: > > On Wed, 18 Aug 2021, Richard Sandiford wrote: > >> I think it would be OK/sensible to use the larger of the index or > >> result vectors to determine the mask, if that helps. There just > >> wasn't any need to make a dist

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-19 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, 18 Aug 2021, Richard Sandiford wrote: >> I think it would be OK/sensible to use the larger of the index or >> result vectors to determine the mask, if that helps. There just >> wasn't any need to make a distinction for SVE, since there the >> mask type is determin

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-19 Thread Richard Biener via Gcc-patches
On Wed, 18 Aug 2021, Richard Sandiford wrote: > Richard Biener writes: > > On Wed, 18 Aug 2021, Hongtao Liu wrote: > > > >> On Wed, Aug 18, 2021 at 7:37 PM Hongtao Liu wrote: > >> > > >> > On Wed, Aug 18, 2021 at 7:30 PM Hongtao Liu wrote: > >> > > > >> > > On Wed, Aug 18, 2021 at 6:28 PM Richa

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, 18 Aug 2021, Hongtao Liu wrote: > >> On Wed, Aug 18, 2021 at 7:37 PM Hongtao Liu wrote: >> > >> > On Wed, Aug 18, 2021 at 7:30 PM Hongtao Liu wrote: >> > > >> > > On Wed, Aug 18, 2021 at 6:28 PM Richard Biener wrote: >> > > > >> > > > On Wed, 18 Aug 2021, Richar

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Aug 2021, Hongtao Liu wrote: > On Wed, Aug 18, 2021 at 7:37 PM Hongtao Liu wrote: > > > > On Wed, Aug 18, 2021 at 7:30 PM Hongtao Liu wrote: > > > > > > On Wed, Aug 18, 2021 at 6:28 PM Richard Biener wrote: > > > > > > > > On Wed, 18 Aug 2021, Richard Biener wrote: > > > > > > > > >

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 18, 2021 at 7:37 PM Hongtao Liu wrote: > > On Wed, Aug 18, 2021 at 7:30 PM Hongtao Liu wrote: > > > > On Wed, Aug 18, 2021 at 6:28 PM Richard Biener wrote: > > > > > > On Wed, 18 Aug 2021, Richard Biener wrote: > > > > > > > > > > > So in the end I seem to be able to combine AVX & AV

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 18, 2021 at 7:30 PM Hongtao Liu wrote: > > On Wed, Aug 18, 2021 at 6:28 PM Richard Biener wrote: > > > > On Wed, 18 Aug 2021, Richard Biener wrote: > > > > > > > > So in the end I seem to be able to combine AVX & AVX512 arriving > > > at the following which passes basic testing. I wi

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Aug 2021, Richard Biener wrote: > On Wed, 18 Aug 2021, Richard Biener wrote: > > > > > So in the end I seem to be able to combine AVX & AVX512 arriving > > at the following which passes basic testing. I will now see to > > teach the vectorizer the required "promotion" to handle > > m

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 18, 2021 at 6:28 PM Richard Biener wrote: > > On Wed, 18 Aug 2021, Richard Biener wrote: > > > > > So in the end I seem to be able to combine AVX & AVX512 arriving > > at the following which passes basic testing. I will now see to > > teach the vectorizer the required "promotion" to h

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Aug 2021, Hongtao Liu wrote: > On Wed, Aug 18, 2021 at 5:54 PM Richard Biener wrote: > > > > > > So in the end I seem to be able to combine AVX & AVX512 arriving > > at the following which passes basic testing. I will now see to > > teach the vectorizer the required "promotion" to han

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Aug 2021, Richard Biener wrote: > > So in the end I seem to be able to combine AVX & AVX512 arriving > at the following which passes basic testing. I will now see to > teach the vectorizer the required "promotion" to handle > mask_gather_loadv4dfv4si and mask_gather_loadv4sfv4di. > >

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 18, 2021 at 5:54 PM Richard Biener wrote: > > > So in the end I seem to be able to combine AVX & AVX512 arriving > at the following which passes basic testing. I will now see to > teach the vectorizer the required "promotion" to handle > mask_gather_loadv4dfv4si and mask_gather_loadv4

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Biener via Gcc-patches
So in the end I seem to be able to combine AVX & AVX512 arriving at the following which passes basic testing. I will now see to teach the vectorizer the required "promotion" to handle mask_gather_loadv4dfv4si and mask_gather_loadv4sfv4di. Meanwhile, do you see any hole in the below? If not I'l

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Aug 2021, Hongtao Liu wrote: > On Wed, Aug 18, 2021 at 4:32 PM Richard Biener wrote: > > > > On Wed, 18 Aug 2021, Hongtao Liu wrote: > > > > > On Wed, Aug 18, 2021 at 11:24 AM Hongtao Liu wrote: > > > > > > > > On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches > > > > w

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 18, 2021 at 4:32 PM Richard Biener wrote: > > On Wed, 18 Aug 2021, Hongtao Liu wrote: > > > On Wed, Aug 18, 2021 at 11:24 AM Hongtao Liu wrote: > > > > > > On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches > > > wrote: > > > > > > > > On Tue, Aug 17, 2021 at 3:29 PM Ric

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Aug 2021, Hongtao Liu wrote: > On Wed, Aug 18, 2021 at 11:24 AM Hongtao Liu wrote: > > > > On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches > > wrote: > > > > > > On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches > > > wrote: > > > > > > > > This is an att

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 18, 2021 at 11:24 AM Hongtao Liu wrote: > > On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches > wrote: > > > > On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches > > wrote: > > > > > > This is an attempt to start moving the x86 backend to use > > > standard

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches wrote: > > On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches > wrote: > > > > This is an attempt to start moving the x86 backend to use > > standard pattern names for [mask_]gather_load and [mask_]scatter_store > > rathe

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches wrote: > > On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches > wrote: > > > > This is an attempt to start moving the x86 backend to use > > standard pattern names for [mask_]gather_load and [mask_]scatter_store > > rathe

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches wrote: > > This is an attempt to start moving the x86 backend to use > standard pattern names for [mask_]gather_load and [mask_]scatter_store > rather than using the builtin_{gather,scatter} target hooks. > > I've started with AVX2 gat