public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/meissner/heads/work067)] Fix SFmode subreg of DImode and TImode
Date: Mon,  6 Sep 2021 21:17:08 +0000 (GMT)	[thread overview]
Message-ID: <20210906211708.36C7A3858439@sourceware.org> (raw)

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

commit ac07ff1369cd50d70c689933ac7e46bfa70eb229
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Mon Sep 6 17:16:25 2021 -0400

    Fix SFmode subreg of DImode and TImode
    
    2021-09-06  Michael Meissner  <meissner@linux.ibm.com>
    
    gcc/
    
            * config/rs6000/rs6000.c (rs6000_emit_move_si_sf_subreg): Deal
            with SUBREGs of TImode and DImode.

Diff:
---
 gcc/config/rs6000/rs6000.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index b9ebd56c993..7bbf29a3e1c 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -10942,6 +10942,16 @@ rs6000_emit_move_si_sf_subreg (rtx dest, rtx source, machine_mode mode)
 	  return true;
 	}
 
+      /* In case we are given a SUBREG for a larger type, reduce it to
+	 SImode.  */
+      if (mode == SFmode && GET_MODE_SIZE (inner_mode) > 4)
+	{
+	  rtx tmp = gen_reg_rtx (SImode);
+	  emit_move_insn (tmp, gen_lowpart (SImode, source));
+	  emit_insn (gen_movsf_from_si (dest, tmp));
+	  return true;
+	}
+
       if (mode == SFmode && inner_mode == SImode)
 	{
 	  emit_insn (gen_movsf_from_si (dest, inner_source));


             reply	other threads:[~2021-09-06 21:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 21:17 Michael Meissner [this message]
2021-09-08 16:53 Michael Meissner
2021-09-08 18:09 Michael Meissner
2021-09-08 19:00 Michael Meissner
2021-09-08 19:10 Michael Meissner
2021-09-08 21:52 Michael Meissner

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=20210906211708.36C7A3858439@sourceware.org \
    --to=meissner@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).