public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "roger at nextmovesoftware dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/102031] [12 Regression] ICE in simplify_truncation, at simplify-rtx.c:620 since r12-3074-g7e5f9ead16d7514b3baa0254084de94f0bfcd216
Date: Tue, 24 Aug 2021 09:17:05 +0000	[thread overview]
Message-ID: <bug-102031-4-bJQFrmcyvc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102031-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |roger at nextmovesoftware dot com
   Last reconfirmed|                            |2021-08-24
     Ever confirmed|0                           |1
                 CC|                            |roger at nextmovesoftware dot com
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Roger Sayle <roger at nextmovesoftware dot com> ---
It's just not my week... A pair of silly typos.  Here's the fix I'm testing:
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 8eea9fb..c81e27e 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -841,7 +841,7 @@ simplify_context::simplify_truncation (machine_mode mode,
rt
x op,
        {
          unsigned int int_op_prec = GET_MODE_PRECISION (int_op_mode);
          unsigned int subreg_prec = GET_MODE_PRECISION (subreg_mode);
-         if (int_op_prec > subreg_mode)
+         if (int_op_prec > subreg_prec)
            {
              if (int_mode == subreg_mode)
                return SUBREG_REG (op);
@@ -851,7 +851,7 @@ simplify_context::simplify_truncation (machine_mode mode,
rt
x op,
            }
          /* Simplification of (truncate:A (subreg:B X:C 0)) where
             A is narrower than B and B is narrower than C.  */
-         else if (int_op_prec < subreg_mode
+         else if (int_op_prec < subreg_prec
                   && GET_MODE_PRECISION (int_mode) < int_op_prec)
            return simplify_gen_unary (TRUNCATE, int_mode,
                                       SUBREG_REG (op), subreg_mode);

  parent reply	other threads:[~2021-08-24  9:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24  7:20 [Bug target/102031] New: " marxin at gcc dot gnu.org
2021-08-24  7:23 ` [Bug target/102031] " pinskia at gcc dot gnu.org
2021-08-24  9:17 ` roger at nextmovesoftware dot com [this message]
2021-08-24  9:24 ` [Bug rtl-optimization/102031] " marxin at gcc dot gnu.org
2021-08-24 21:08 ` cvs-commit at gcc dot gnu.org
2021-08-30  7:57 ` marxin 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-102031-4-bJQFrmcyvc@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: link
Be 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).