RISC-V: Fix bug of before_p function
compare_with will return other than -1, so it should check less than 0 rather than check exactly with -1. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (before_p): Fix bug.
This commit is contained in:
parent
e577b91bba
commit
9b9a1ac14c
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,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
|
||||
|
|
Loading…
Add table
Reference in a new issue