Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread Kito Cheng via Gcc-patches
> > Thank you so much. Kito helped me fix it already. > > RVV instruction patterns can have CSE optimizations now. > What was the issue? VL and VTYPE isn't listed in fixed register so CSE feel that isn't cheap (See CHEAP_REGNO in cse.cc), but actually it's kind of mistake sett for VL and VTYPE reg

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread juzhe.zhong
e.zh...@rivai.ai From: Jeff Law Date: 2023-02-02 22:36 To: juzhe.zh...@rivai.ai; rguenther CC: gcc-patches; kito.cheng; richard.sandiford; apinski Subject: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block On 2/2/23 05:35, juzhe.zh...@rivai.ai wrote: >

Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread Jeff Law via Gcc-patches
On 2/2/23 05:35, juzhe.zh...@rivai.ai wrote: Thank you so much. Kito helped me fix it already. RVV instruction patterns can have CSE optimizations now. What was the issue? jeff

Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread Jeff Law via Gcc-patches
On 2/2/23 05:26, Richard Biener wrote: On Thu, 2 Feb 2023, juzhe.zh...@rivai.ai wrote: Yeah, Thanks. You are right. CSE should do the job. Now I know the reason CSE failed to optimize is I include VL_REGNUM(66)/VTYPE_RENUM(67) hard reg as the dependency of pred_broadcast: (insn 19 18 20 4 (

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread juzhe.zh...@rivai.ai
] CPROP: Allow cprop optimization when the function has a single block On Thu, 2 Feb 2023, juzhe.zh...@rivai.ai wrote: > Yeah, Thanks. You are right. CSE should do the job. > Now I know the reason CSE failed to optimize is I include > VL_REGNUM(66)/VTYPE_RENUM(67) hard reg > as the d

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread Richard Biener via Gcc-patches
On Thu, 2 Feb 2023, juzhe.zh...@rivai.ai wrote: > Yeah, Thanks. You are right. CSE should do the job. > Now I know the reason CSE failed to optimize is I include > VL_REGNUM(66)/VTYPE_RENUM(67) hard reg > as the dependency of pred_broadcast: > (insn 19 18 20 4 (set (reg:VNx1DI 152) > > (

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread juzhe.zh...@rivai.ai
structions ? Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-02-01 23:46 To: juzhe.zhong CC: rguenther; gcc-patches; kito.cheng; richard.sandiford; jeffreyalaw; apinski Subject: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block Am 01.02.2023 um 13:57

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread juzhe.zh...@rivai.ai
t sure whether CSE can propagate the 151 pseudo to the second pred_add ?? juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-02-01 20:51 To: juzhe.zh...@rivai.ai CC: gcc-patches; kito.cheng; richard.sandiford; jeffreyalaw; apinski Subject: Re: Re: [PATCH] CPROP: Allow cprop optimization wh

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread Richard Biener via Gcc-patches
8) > (expr_list:REG_DEAD (reg/v:VNx1DI 139 [ v3 ]) > (nil > > You can see CPROP remove the second the "pred_broadcast" instruction and > propagate the result to the second "pred_add" instruction? I see loads of UNSPECs, that might explain why

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread juzhe.zh...@rivai.ai
CPROP remove the second the "pred_broadcast" instruction and propagate the result to the second "pred_add" instruction。 juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-02-01 20:40 To: Ju-Zhe Zhong CC: gcc-patches; kito.cheng; richard.sandiford; jeffreyalaw; apinski Subje

Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread Richard Biener via Gcc-patches
On Wed, 1 Feb 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, this patch is present for GCC 14 since I understand it's not appropriate > to land it in GCC 13. > > NUM_FIXED_BLOCKS = 2 since GCC define each function has aleast 2 blocks > one is entry block, the other is exit block