public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-2173] CRIS: Don't apply PATTERN to insn before validation (PR 110144)
Date: Wed, 28 Jun 2023 21:19:30 +0000 (GMT)	[thread overview]
Message-ID: <20230628211930.B9C153858D35@sourceware.org> (raw)

https://gcc.gnu.org/g:c15905da939fd5cf6ccc3f19f3ab273525f34f98

commit r14-2173-gc15905da939fd5cf6ccc3f19f3ab273525f34f98
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Wed Jun 28 03:01:08 2023 +0200

    CRIS: Don't apply PATTERN to insn before validation (PR 110144)
    
    Oops.  The validation was there, but PATTERN was applied
    before that.  Noticeable only with rtl-checking (for example
    as in the report: "--enable-checking=yes,rtl") as this
    statement was only a (one of many) straggling olde-C
    declare-and-initialize-at-beginning-of-block thing.
    
            PR target/110144
            * config/cris/cris.cc (cris_postdbr_cmpelim): Don't apply PATTERN
            to insn before validating it.

Diff:
---
 gcc/config/cris/cris.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/cris/cris.cc b/gcc/config/cris/cris.cc
index 7fca2af085a..f04f501326e 100644
--- a/gcc/config/cris/cris.cc
+++ b/gcc/config/cris/cris.cc
@@ -375,7 +375,6 @@ cris_postdbr_cmpelim ()
   for (insn = get_insns (); insn; insn = next)
     {
       rtx_insn *outer_insn = insn;
-      rtx pat = PATTERN (insn);
 
       next = NEXT_INSN (outer_insn);
 
@@ -389,6 +388,7 @@ cris_postdbr_cmpelim ()
 
       if (!NONDEBUG_INSN_P (insn))
 	continue;
+      rtx pat = PATTERN (insn);
 
       /* Consider filled delay slots; there might be a comparison there.
 	 It's only the second insn in a sequence that is interesting.  */

                 reply	other threads:[~2023-06-28 21:19 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=20230628211930.B9C153858D35@sourceware.org \
    --to=hp@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: 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).