Hi Jeff, Ju-Zhe: Let you know that I am running creduce with this testcase for reduce the size of testcsae, it's really too huge...
On Wed, Apr 19, 2023 at 3:00 AM Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > > On 4/17/23 20:03, juzhe.zh...@rivai.ai wrote: > > From: Ju-Zhe Zhong <juzhe.zh...@rivai.ai> > > > > gcc/ChangeLog: > > > > * config/riscv/riscv-vsetvl.cc (count_regno_occurrences): New > > function. > > (pass_vsetvl::cleanup_insns): Fix bug. > ChangeLog should reference the bug number, like this: > > PR target/109535 > > > > > > --- > > gcc/config/riscv/riscv-vsetvl.cc | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/gcc/config/riscv/riscv-vsetvl.cc > > b/gcc/config/riscv/riscv-vsetvl.cc > > index 1b66e3b9eeb..43e2cf08377 100644 > > --- a/gcc/config/riscv/riscv-vsetvl.cc > > +++ b/gcc/config/riscv/riscv-vsetvl.cc > > @@ -1592,6 +1592,19 @@ backward_propagate_worthwhile_p (const basic_block > > cfg_bb, > > return true; > > } > > > > +/* Count the number of REGNO in RINSN. */ > > +int > > +count_regno_occurrences (rtx_insn *rinsn, unsigned int regno) > Seems like this ought to be static. Though it's not clear why > count_occurrences didn't do what you needed. Can you explain why > count_occurrences was insufficient for your needs? > > > > > Jeff