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:
Ju-Zhe Zhong 2023-01-18 11:09:21 +08:00 committed by Kito Cheng
parent e577b91bba
commit 9b9a1ac14c

View file

@ -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