Re: Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-19 Thread juzhe.zh...@rivai.ai
: Jeff Law Date: 2023-04-19 13:43 To: juzhe.zh...@rivai.ai; kito.cheng; Richard Biener CC: gcc-patches; palmer Subject: Re: [PATCH] RISC-V: Fix bug reported by PR109535 On 4/18/23 19:29, juzhe.zh...@rivai.ai wrote: > I tried refers_to_regno_p > It can not work for us since it just retur

Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-18 Thread Jeff Law via Gcc-patches
On 4/18/23 19:29, juzhe.zh...@rivai.ai wrote: I tried refers_to_regno_p It can not work for us since it just return true or false whether the "rtx" has the regno. Use refers_to_regno_p instead of the equality comparison for the REGNO. So you're still going to have count_regno_occurrences,

Re: Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-18 Thread juzhe.zh...@rivai.ai
Date: 2023-04-19 09:11 To: juzhe.zh...@rivai.ai; kito.cheng; Richard Biener CC: gcc-patches; palmer Subject: Re: [PATCH] RISC-V: Fix bug reported by PR109535 On 4/18/23 19:04, juzhe.zh...@rivai.ai wrote: > The bug issue reported by google/highway project: > (set(..) >

Re: Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-18 Thread juzhe.zh...@rivai.ai
mind giving me more suggestions? Thanks juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-04-19 09:11 To: juzhe.zh...@rivai.ai; kito.cheng; Richard Biener CC: gcc-patches; palmer Subject: Re: [PATCH] RISC-V: Fix bug reported by PR109535 On 4/18/23 19:04, juzhe.zh...@rivai.ai wrote: > The b

Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-18 Thread Jeff Law via Gcc-patches
On 4/18/23 19:04, juzhe.zh...@rivai.ai wrote: The bug issue reported by google/highway project: (set(..)        (reg:QI s0) (reg:DI s0)) The "avl" operand rtx  = (reg:DI s0) count_occurrences return 1 however the actual regno occurrences should be 2. In this case, the VSETVL PASS

Re: Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-18 Thread juzhe.zh...@rivai.ai
(reg:DI s0) then file assertion in RTL_SSA. Instead, we should not eliminate "s0" dependency. Thanks juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-04-19 08:56 To: Kito Cheng; juzhe.zhong; Richard Biener CC: gcc-patches; palmer Subject: Re: [PATCH] RISC-V: Fix bug reported by PR109535 On

Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-18 Thread Jeff Law via Gcc-patches
On 4/18/23 18:18, Kito Cheng wrote: Hi Richard, Jeff: It's it possible to backport to GCC 13? highway is one of our important users for RISC-V vector stuff, and it has built in some distro, so we believe this bug fix is important to backport. I want to see an explanation why

Re: [PATCH] RISC-V: Fix bug reported by PR109535

2023-04-18 Thread Kito Cheng via Gcc-patches
Hi Richard, Jeff: It's it possible to backport to GCC 13? highway is one of our important users for RISC-V vector stuff, and it has built in some distro, so we believe this bug fix is important to backport. Thanks Hi Ju-Zhe: Thanks for update On Wed, Apr 19, 2023 at 7:25 AM wrote: > > From: