Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread Richard Biener via Gcc-patches
On Tue, 25 Jul 2023, Richard Sandiford wrote: > ??? writes: > > Hi, Richi. Thank you so much for review. > > > >>> This function doesn't seem to care about conditional vectorization > >>> support, so why are you changing it? > > > > I debug and analyze the code here: > > > > Breakpoint 1,

Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-25 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Hi, Richard. >>> I think we should have an internal-fn helper that returns IFN_COND_LEN_* >>> for a given IFN_COND_*. It could handle IFN_MASK_LOAD -> IFN_MASK_LEN_LOAD >>> etc. too. > Could you name this helper function for me? Does it call >

Re: Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-25 Thread juzhe.zh...@rivai.ai
rnal_fn_for_conditional_fn" ? Thanks. juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-07-25 18:21 To: juzhe.zhong\@rivai.ai CC: rguenther; gcc-patches Subject: Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_* "juzhe.zh...@rivai.ai" writes: > Thanks Richard. &

Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-25 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Thanks Richard. > > Do you suggest we should add a macro like this first: > > #ifndef DEF_INTERNAL_COND_FN > #define DEF_INTERNAL_COND_FN(NAME, FLAGS, OPTAB, TYPE) \ > DEF_INTERNAL_OPTAB_FN (COND_##NAME, FLAGS, cond_##optab, cond_##TYPE) > DEF_INTERNAL_OPTAB_FN

Re: Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-25 Thread juzhe.zh...@rivai.ai
, cond_len_##TYPE) #endif If yes, maybe I should first do this in a single patch first? juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-07-25 17:41 To: 钟居哲 CC: rguenther; gcc-patches Subject: Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_* 钟居哲 writes: > Hi, Richi. Thank

Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-25 Thread Richard Sandiford via Gcc-patches
钟居哲 writes: > Hi, Richi. Thank you so much for review. > >>> This function doesn't seem to care about conditional vectorization >>> support, so why are you changing it? > > I debug and analyze the code here: > > Breakpoint 1, vectorizable_call (vinfo=0x3d358d0, stmt_info=0x3dcc820, > gsi=0x0,

Re: Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-24 Thread 钟居哲
mpare them (the other one I need to support COND_xxx in RISC-V port). Maybe it's better enable COND_xxx in RISC-V port so that the codes in middle-end look much more reasonable ? I think maybe next time I should ask you first about the solution before I send the patch Looking forwar

Re: [PATCH] VECT: Support CALL vectorization for COND_LEN_*

2023-07-24 Thread Richard Biener via Gcc-patches
On Mon, 24 Jul 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, Richard and Richi. > > This patch supports CALL vectorization by COND_LEN_*. > > Consider this following case: > void foo (float * __restrict a, float * __restrict b, int * __restrict cond, > int n) > { > for