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
and duplicate this tail into the cases makes it easier to follow. For nested_in_vect_loop we never have LOOP_VINFO_USING_SELECT_VL_P? Richard. > Thanks. > > > juzhe.zh...@rivai.ai > > From: Richard Biener > Date: 2023-11-09 20:16 > To: Juzhe-Zhong > CC: gcc-patches;

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

2023-11-09 Thread 钟居哲
ector (loop_vinfo, stmt_info, new_vec, step_vectype, + LOOP_VINFO_USING_SELECT_VL_P (loop_vinfo) ? &si : NULL); Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-11-09 20:16 To: Juzhe-Zhong CC: gcc-patches; richard.sandiford; rguenther; kito.cheng; kito.cheng Subject: Re: [PATCH]

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

2023-11-09 Thread juzhe.zh...@rivai.ai
elect_vl_p is true ? Is it reasonable ? juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-11-09 20:16 To: Juzhe-Zhong CC: gcc-patches; richard.sandiford; rguenther; kito.cheng; kito.cheng Subject: Re: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV On Wed, Nov 8, 20

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

2023-11-09 Thread Richard Biener
On Wed, Nov 8, 2023 at 11:53 AM Juzhe-Zhong wrote: > > PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112438 > > SELECT_VL result is not necessary always VF in non-final iteration. > > Current GIMPLE IR is wrong: > > # vect_vec_iv_.21_25 = PHI <_24(4), { 0, 1, 2, ... }(3)> > ... > _24 = vect_vec

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

2023-11-09 Thread juzhe.zh...@rivai.ai
Bootstrap + regression on X86 passed. Ok for trunk ? juzhe.zh...@rivai.ai From: Juzhe-Zhong Date: 2023-11-08 18:53 To: gcc-patches CC: richard.sandiford; rguenther; kito.cheng; kito.cheng; Juzhe-Zhong Subject: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV PR: https

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

2023-11-08 Thread juzhe.zh...@rivai.ai
; rguenther; kito.cheng; kito.cheng; Juzhe-Zhong Subject: [PATCH] Middle-end: Fix bug of induction variable vectorization for RVV PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112438 SELECT_VL result is not necessary always VF in non-final iteration. Current GIMPLE IR is wrong: # vect_vec_iv_.21_25

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

2023-11-08 Thread Juzhe-Zhong
PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112438 SELECT_VL result is not necessary always VF in non-final iteration. Current GIMPLE IR is wrong: # vect_vec_iv_.21_25 = PHI <_24(4), { 0, 1, 2, ... }(3)> ... _24 = vect_vec_iv_.21_25 + { POLY_INT_CST [4, 4], ... }; After this patch which is