Re: Re: [PATCH] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-09 Thread 钟居哲
gcc-patches Subject: Re: Re: [PATCH] VECT: Support loop len control on EXTRACT_LAST vectorization On Wed, 9 Aug 2023, ??? wrote: > Hi, Richard. > > >> I'm a bit behind of email, but why isn't BIT_FIELD_REF enough for > >> the case that the patch is handling?

Re: Re: [PATCH] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-09 Thread Richard Biener via Gcc-patches
On Wed, 9 Aug 2023, ??? wrote: > Hi, Richard. > > >> I'm a bit behind of email, but why isn't BIT_FIELD_REF enough for > >> the case that the patch is handling? It seems that: > > >> .EXTRACT_LAST (len, vec) > > >> is equivalent to: > > >> vec[len - 1] > > >> I think eventually there'll

Re: Re: [PATCH] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-09 Thread 钟居哲
Hi, Richard. >> I'm a bit behind of email, but why isn't BIT_FIELD_REF enough for >> the case that the patch is handling? It seems that: >> .EXTRACT_LAST (len, vec) >> is equivalent to: >> vec[len - 1] >> I think eventually there'll be the temptation to lower/fold it like that. Current B

Re: Re: [PATCH] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-09 Thread juzhe.zh...@rivai.ai
s as well we could just subtract >> SLP_TREE_LANES (node) - slp_index from it? I'll note we don't handle ncopies > 1 which I think we could with using FOLD_EXTRACT_LAST? For SLP stuff, I am not sure. And I agree that we need to wait for Richard S review. Thanks. juzhe.zh..

Re: Re: [PATCH] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-09 Thread Richard Biener via Gcc-patches
On Wed, 9 Aug 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richi. > > >> that should be > > >> || (!LOOP_VINFO_FULLY_MASKED_P (loop_vinfo) > >> && !LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo)) > > >> I think. It seems to imply that SLP isn't supported with > >> masking/lengthing. > > Oh, y

Re: Re: [PATCH] VECT: Support loop len control on EXTRACT_LAST vectorization

2023-08-09 Thread juzhe.zh...@rivai.ai
Hi, Richi. >> that should be >> || (!LOOP_VINFO_FULLY_MASKED_P (loop_vinfo) >> && !LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo)) >> I think. It seems to imply that SLP isn't supported with >> masking/lengthing. Oh, yes. At first glance, the original code is quite suspicious and your c