Re: Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-04-22 Thread Feng Wang
On 2023-04-22 08:08  Jeff Law wrote: > > > >On 3/23/23 19:53, Feng Wang wrote: >> This patch optimize the combine processing for sext.b/h in rv64. >> Please refer to the following test case, >> int sextb32(int x) >> { return (x << 24) >> 24; } >> >> The rtl expression is as follows, >> (insn 6 3 7

Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-04-21 Thread Jeff Law via Gcc-patches
On 3/23/23 19:53, Feng Wang wrote: This patch optimize the combine processing for sext.b/h in rv64. Please refer to the following test case, [ ... ] I've opened BZ109592 to track this problem. jeff

Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-04-21 Thread Jeff Law via Gcc-patches
On 3/23/23 19:53, Feng Wang wrote: This patch optimize the combine processing for sext.b/h in rv64. Please refer to the following test case, int sextb32(int x) { return (x << 24) >> 24; } The rtl expression is as follows, (insn 6 3 7 2 (set (reg:SI 138) (ashift:SI (subreg/s/u:SI (reg

Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-03-26 Thread Jeff Law via Gcc-patches
On 3/26/23 19:32, Feng Wang wrote: On 2023-03-26 02:18  Jeff Law wrote: On 3/23/23 20:45, juzhe.zh...@rivai.ai wrote: Sounds like you are looking at redundant extension problem in RISC-V port. This is the issue I want to fix but I don't find the time to do that. My first impression is tha

Re: Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-03-26 Thread Feng Wang
On 2023-03-26 02:18  Jeff Law wrote: > > > >On 3/23/23 20:45, juzhe.zh...@rivai.ai wrote: >> Sounds like you are looking at redundant extension problem in RISC-V port. >> This is the issue I want to fix but I don't find the time to do that. >> My first impression is that we need to fix redundant ex

Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-03-25 Thread Jeff Law via Gcc-patches
On 3/23/23 20:45, juzhe.zh...@rivai.ai wrote: Sounds like you are looking at redundant extension problem in RISC-V port. This is the issue I want to fix but I don't find the time to do that. My first impression is that we need to fix redundant extension in "ree" PASS. I am not sure. It's ac

Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-03-23 Thread Feng Wang
Hi Juzhe, Thank you for your reply, I'm really doing some optimization work right now. I am very interested in the question you have raised, and I will take the time to try to optimize it. I hope I can communicate with you and learn from you more in the future. Thanks.