Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-10 Thread Richard Biener
ems that this following codes: > > > > t = unshare_expr (new_name); > > gcc_assert (CONSTANT_CLASS_P (new_name) > > || TREE_CODE (new_name) == SSA_NAME); > > new_vec = build_vector_from_val (step_vectype, t); > > vec_st

Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-10 Thread juzhe.zh...@rivai.ai
i.ai CC: Richard Biener; gcc-patches; richard.sandiford; kito.cheng; Kito.cheng Subject: Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV On Fri, 10 Nov 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richard. > > I am sorry for bothering you. I am trying to understand

Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-10 Thread Richard Biener
the if () and set that accordingly only in the LOOP_VINFO_USING_SELECT_VL_P path. But otherwise yes. Richard. > > Thanks. > > > > juzhe.zh...@rivai.ai > > From: Richard Biener > Date: 2023-11-10 17:46 > To: ??? > CC: richard.guenther; gcc-patches; richard.san

Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-10 Thread juzhe.zh...@rivai.ai
ou want? Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-11-10 17:46 To: 钟居哲 CC: richard.guenther; gcc-patches; richard.sandiford; kito.cheng; kito.cheng Subject: Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV On Thu, 9 Nov 2023, ??? wrote: >

Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-10 Thread juzhe.zh...@rivai.ai
te: 2023-11-10 17:46 To: 钟居哲 CC: richard.guenther; gcc-patches; richard.sandiford; kito.cheng; kito.cheng Subject: Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV On Thu, 9 Nov 2023, ??? wrote: > Hi, Richard. > > >> I think it would be better to spli

Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-10 Thread Richard Biener
On Thu, 9 Nov 2023, ??? wrote: > Hi, Richard. > > >> I think it would be better to split out building a tree from VF from both > >> arms and avoid using 'vf' when LOOP_VINFO_USING_SELECT_VL_P. > > I am trying to split out building tree from both arms as you suggested.. > Could you take a look th

Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-09 Thread 钟居哲
Hi, Richard. >> I think it would be better to split out building a tree from VF from both >> arms and avoid using 'vf' when LOOP_VINFO_USING_SELECT_VL_P. I am trying to split out building tree from both arms as you suggested.. Could you take a look the following codes ? diff --git a/gcc/tree-vec

Re: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV

2023-11-09 Thread juzhe.zh...@rivai.ai
Hi, Richard. >> I think it would be better to split out building a tree from VF from both >> arms and avoid using 'vf' when LOOP_VINFO_USING_SELECT_VL_P. Ok. >> Btw, you are not patching the SLP path here which I believe has the same >> problem but is currently exempt from non-constant VF at lea