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

2023-08-10 Thread Richard Biener via Gcc-patches
On Thu, 10 Aug 2023, Robin Dapp wrote: > > Hmm, I think VEC_EXTRACT and VEC_SET should be ECF_CONST. Maybe the > > GIMPLE ISEL > > comments do not match the implementation, but then that should be fixed? > > > > /* Expand all ARRAY_REF(VIEW_CONVERT_EXPR) gimple assignments into calls > > to >

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

2023-08-10 Thread Robin Dapp via Gcc-patches
> Hmm, I think VEC_EXTRACT and VEC_SET should be ECF_CONST. Maybe the > GIMPLE ISEL > comments do not match the implementation, but then that should be fixed? > > /* Expand all ARRAY_REF(VIEW_CONVERT_EXPR) gimple assignments into calls > to >internal function based on vector type of selecte

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

2023-08-10 Thread juzhe.zh...@rivai.ai
e.zh...@rivai.ai CC: gcc-patches; richard.sandiford Subject: Re: Re: [PATCH V2] VECT: Support loop len control on EXTRACT_LAST vectorization On Thu, 10 Aug 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richi. > > >> What inserts the required LC SSA PHI in that case? > > Here is the flow how GCC i

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

2023-08-10 Thread Richard Biener via Gcc-patches
as ECF_CONST, it can definitely work > but such pattern is redundant since we can reuse 'VEC_EXTRACT' pattern which > is suitable for us. Hmm, I think VEC_EXTRACT and VEC_SET should be ECF_CONST. Maybe the GIMPLE ISEL comments do not match the implementation, but then

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

2023-08-10 Thread juzhe.zh...@rivai.ai
roach I think is adding IFN_EXTRACT_LAST_LEN as Richard said, and make IFN_EXTRACT_LAST_LEN as ECF_CONST, it can definitely work but such pattern is redundant since we can reuse 'VEC_EXTRACT' pattern which is suitable for us. Thanks. juzhe.zh...@rivai.ai From: Richard Biener

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

2023-08-10 Thread Richard Biener via Gcc-patches
;t need this for SVE fully masked loops. What inserts the required LC SSA PHI in that case? > Thanks. > > > juzhe.zh...@rivai.ai > > From: Richard Biener > Date: 2023-08-10 15:58 > To: Ju-Zhe Zhong > CC: gcc-patches; richard.sandiford > Subject: Re: [PATCH V2] VECT:

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

2023-08-10 Thread juzhe.zh...@rivai.ai
own_not_updated_vssa = true ? After it's fixed then this patch with removing 'vinfo->any_known_not_updated_vssa = true' is ok for trunk, am I right? Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-08-10 15:58 To: Ju-Zhe Zhong CC: gcc-patches; richard.sandifor

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

2023-08-10 Thread juzhe.zh...@rivai.ai
n ARM SVE turns out that the LC SSA is created by: 'rewrite_into_loop_closed_ssa' Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-08-10 15:58 To: Ju-Zhe Zhong CC: gcc-patches; richard.sandiford Subject: Re: [PATCH V2] VECT: Support loop len control on EXTRACT_LAST v

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

2023-08-10 Thread Richard Biener via Gcc-patches
On Thu, 10 Aug 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, Richard and Richi. > > This patch add support live vectorization by VEC_EXTRACT for LEN loop control. > > Consider this following case: > > #include > > #define EXTRACT_LAST(TYPE)\ > TYPE __a

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

2023-08-10 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, Richard and Richi. This patch add support live vectorization by VEC_EXTRACT for LEN loop control. Consider this following case: #include #define EXTRACT_LAST(TYPE) \ TYPE __attribute__ ((noinline, noclone)) \ test_##TYPE (TYPE *x, int n, T