public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2173] CRIS: Don't apply PATTERN to insn before validation (PR 110144)
@ 2023-06-28 21:19 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-06-28 21:19 UTC (permalink / raw)
  To: gcc-cvs

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.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-28 21:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-28 21:19 [gcc r14-2173] CRIS: Don't apply PATTERN to insn before validation (PR 110144) Hans-Peter Nilsson

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).