public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-5435] RISC-V: Fix bug of before_p function
@ 2023-01-27 10:09 Kito Cheng
0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2023-01-27 10:09 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9b9a1ac14cdca6eef8dbcab0d33f3c03774a6c77
commit r13-5435-g9b9a1ac14cdca6eef8dbcab0d33f3c03774a6c77
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date: Wed Jan 18 11:09:21 2023 +0800
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.
Diff:
---
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 45e14d0ff03..a18ccd72ab6 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-27 10:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 10:09 [gcc r13-5435] RISC-V: Fix bug of before_p function Kito Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).