public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-6237] RISC-V: Fix PR112888 ICE
@ 2023-12-06 23:33 Patrick O'Neill
0 siblings, 0 replies; only message in thread
From: Patrick O'Neill @ 2023-12-06 23:33 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:db642d60ee81cd99d55f4e228d01de704b5b7cfa
commit r14-6237-gdb642d60ee81cd99d55f4e228d01de704b5b7cfa
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date: Thu Dec 7 06:35:02 2023 +0800
RISC-V: Fix PR112888 ICE
Committed as it is obvious.
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (extract_single_source): new function.
(pre_vsetvl::compute_lcm_local_properties): Fix ICE.
Diff:
---
gcc/config/riscv/riscv-vsetvl.cc | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index 68f0be7e81d..90477f331d7 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -596,6 +596,14 @@ extract_single_source (set_info *set)
return first_insn;
}
+static insn_info *
+extract_single_source (def_info *def)
+{
+ if (!def)
+ return nullptr;
+ return extract_single_source (dyn_cast<set_info *> (def));
+}
+
static bool
same_equiv_note_p (set_info *set1, set_info *set2)
{
@@ -2692,9 +2700,7 @@ pre_vsetvl::compute_lcm_local_properties ()
def_lookup dl = crtl->ssa->find_def (resource, insn);
def_info *def
= dl.matching_set_or_last_def_of_prev_group ();
- gcc_assert (def);
- insn_info *def_insn = extract_single_source (
- dyn_cast<set_info *> (def));
+ insn_info *def_insn = extract_single_source (def);
if (def_insn && vsetvl_insn_p (def_insn->rtl ()))
{
vsetvl_info def_info = vsetvl_info (def_insn);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-06 23:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06 23:33 [gcc r14-6237] RISC-V: Fix PR112888 ICE Patrick O'Neill
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).