public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "piggynl at outlook dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109347] New: [lra] Spill failure for architecture without CC Date: Thu, 30 Mar 2023 18:59:37 +0000 [thread overview] Message-ID: <bug-109347-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109347 Bug ID: 109347 Summary: [lra] Spill failure for architecture without CC Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: piggynl at outlook dot com Target Milestone: --- Created attachment 54791 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54791&action=edit Reproduce for riscv64 For all architectures without condition code, when all registers are in use, gcc fails to perform a spill. mips64 and riscv64 are failing with certain code. For example, the codes for mips64 and riscv64 reproducing the bug are in attachments. The expected behavior is generating a spill asm sequence before the `if` block and a restore sequence after, so it will be a free register in the `if` block. gcc is failing an assertion error with the examples. With a release build, gcc falls into an infinity loop. The assertion fails in lra.c: if (e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)) { /* We already made the edge no-critical in ira.c::ira */ lra_assert (!EDGE_CRITICAL_P (e)); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rtx_insn *tmp = BB_HEAD (e->dest); if (LABEL_P (tmp)) The assertion was introduced in e3b3b59683c1.
next reply other threads:[~2023-03-30 18:59 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-30 18:59 piggynl at outlook dot com [this message] 2023-03-30 18:59 ` [Bug middle-end/109347] " piggynl at outlook dot com 2023-03-30 19:32 ` pinskia at gcc dot gnu.org 2023-03-30 19:36 ` pinskia at gcc dot gnu.org 2023-03-30 19:38 ` pinskia at gcc dot gnu.org 2023-03-30 19:39 ` pinskia at gcc dot gnu.org 2023-03-30 19:40 ` pinskia at gcc dot gnu.org 2023-03-30 19:42 ` pinskia at gcc dot gnu.org 2023-03-30 19:42 ` pinskia at gcc dot gnu.org 2023-03-30 19:46 ` pinskia at gcc dot gnu.org 2023-03-30 19:47 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109347-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).