Committed with more comments to describe why this should be fixed. On Wed, Jan 18, 2023 at 11:10 AM <juzhe.zh...@rivai.ai> wrote:
> From: Ju-Zhe Zhong <juzhe.zh...@rivai.ai> > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (before_p): Fix bug. > > --- > gcc/config/riscv/riscv-vsetvl.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/config/riscv/riscv-vsetvl.cc > b/gcc/config/riscv/riscv-vsetvl.cc > index 26d096ea939..728a32dacd6 100644 > --- a/gcc/config/riscv/riscv-vsetvl.cc > +++ b/gcc/config/riscv/riscv-vsetvl.cc > @@ -188,7 +188,7 @@ real_insn_and_same_bb_p (const insn_info *insn, const > bb_info *bb) > static bool > before_p (const insn_info *insn1, const insn_info *insn2) > { > - return insn1->compare_with (insn2) == -1; > + return insn1->compare_with (insn2) < 0; > } > > static bool > -- > 2.36.3 > >