public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Joseph Myers <jsm28@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-8536] Fix ICE on sh
Date: Fri,  1 Jul 2022 15:27:50 +0000 (GMT)	[thread overview]
Message-ID: <20220701152750.B115B3858D28@sourceware.org> (raw)

https://gcc.gnu.org/g:962e7f0803f163f9cf44d64a2e199935d3f361fe

commit r12-8536-g962e7f0803f163f9cf44d64a2e199935d3f361fe
Author: Vladimir Makarov <vmakarov@gcc.gnu.org>
Date:   Sat May 28 12:08:38 2022 -0600

    Fix ICE on sh
    
    gcc/
            PR target/103722
            * config/sh/sh.cc (sh_register_move_cost): Avoid cost "2" (which
            is special) for various scenarios.
    
    (cherry picked from commit ce1580252ea57de23a595e9804ea87ed4353aa6a)

Diff:
---
 gcc/config/sh/sh.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc
index 8d4056338a5..03e1c04ec7e 100644
--- a/gcc/config/sh/sh.cc
+++ b/gcc/config/sh/sh.cc
@@ -10762,6 +10762,12 @@ sh_register_move_cost (machine_mode mode,
       && ! REGCLASS_HAS_GENERAL_REG (dstclass))
     return 2 * ((GET_MODE_SIZE (mode) + 7) / 8U);
 
+  if (((dstclass == FP_REGS || dstclass == DF_REGS)
+       && (srcclass == PR_REGS))
+      || ((srcclass == FP_REGS || srcclass == DF_REGS)
+	  && (dstclass == PR_REGS)))
+    return 7;
+
   return 2 * ((GET_MODE_SIZE (mode) + 3) / 4U);
 }


                 reply	other threads:[~2022-07-01 15:27 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=20220701152750.B115B3858D28@sourceware.org \
    --to=jsm28@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).