public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3105] cselib: Skip BImode while keeping track of subvalue relations [PR107088] Date: Thu, 6 Oct 2022 06:47:25 +0000 (GMT) [thread overview] Message-ID: <20221006064725.60F83384D16C@sourceware.org> (raw) https://gcc.gnu.org/g:5fc4d3e1837ea4850aac6460f563913f1d3fc5b8 commit r13-3105-g5fc4d3e1837ea4850aac6460f563913f1d3fc5b8 Author: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> Date: Thu Oct 6 08:43:53 2022 +0200 cselib: Skip BImode while keeping track of subvalue relations [PR107088] For BImode get_narrowest_mode evaluates to QImode but BImode < QImode. Thus FOR_EACH_MODE_UNTIL never reaches BImode and iterates until OImode for which no wider mode exists so we end up with VOIDmode and fail. Fixed by adding a size guard so we effectively skip BImode. gcc/ChangeLog: PR rtl-optimization/107088 * cselib.cc (new_cselib_val): Skip BImode while keeping track of subvalue relations. Diff: --- gcc/cselib.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/cselib.cc b/gcc/cselib.cc index 9b582e5d3d6..2abc763a3f8 100644 --- a/gcc/cselib.cc +++ b/gcc/cselib.cc @@ -1571,6 +1571,7 @@ new_cselib_val (unsigned int hash, machine_mode mode, rtx x) scalar_int_mode int_mode; if (REG_P (x) && is_int_mode (mode, &int_mode) + && GET_MODE_SIZE (int_mode) > 1 && REG_VALUES (REGNO (x)) != NULL && (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn))) {
reply other threads:[~2022-10-06 6:47 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221006064725.60F83384D16C@sourceware.org \ --to=stefansf@gcc.gnu.org \ --cc=gcc-cvs@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).