public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-11075] SH: Fix PR 111001
@ 2023-10-23 13:24 Oleg Endo
  0 siblings, 0 replies; only message in thread
From: Oleg Endo @ 2023-10-23 13:24 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:626bb2e165daa88f5c7cd66b9db49f03921474a9

commit r11-11075-g626bb2e165daa88f5c7cd66b9db49f03921474a9
Author: Oleg Endo <olegendo@gcc.gnu.org>
Date:   Mon Oct 23 22:08:37 2023 +0900

    SH: Fix PR 111001
    
    gcc/ChangeLog:
    
            PR target/111001
            * config/sh/sh_treg_combine.cc (sh_treg_combine::record_set_of_reg):
            Skip over nop move insns.

Diff:
---
 gcc/config/sh/sh_treg_combine.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gcc/config/sh/sh_treg_combine.cc b/gcc/config/sh/sh_treg_combine.cc
index fb109319938a..f1697f44e4b9 100644
--- a/gcc/config/sh/sh_treg_combine.cc
+++ b/gcc/config/sh/sh_treg_combine.cc
@@ -732,7 +732,14 @@ sh_treg_combine::record_set_of_reg (rtx reg, rtx_insn *start_insn,
 	}
       else if (REG_P (new_entry.cstore.set_src ()))
 	{
-	  // If it's a reg-reg copy follow the copied reg.
+	  // If it's a reg-reg copy follow the copied reg, but ignore
+	  // nop copies of the reg onto itself.
+	  if (REGNO (new_entry.cstore.set_src ()) == REGNO (reg))
+	    {
+	      i = prev_nonnote_nondebug_insn_bb (i);
+	      continue;
+	    }
+
 	  new_entry.cstore_reg_reg_copies.push_back (new_entry.cstore);
 	  reg = new_entry.cstore.set_src ();
 	  i = new_entry.cstore.insn;

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

only message in thread, other threads:[~2023-10-23 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 13:24 [gcc r11-11075] SH: Fix PR 111001 Oleg Endo

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