public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/50829] avx extra copy for _mm256_insertf128_pd
Date: Thu, 24 Nov 2011 05:26:00 -0000	[thread overview]
Message-ID: <bug-50829-4-84Lejd4DZY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50829-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50829

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |target

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-11-24 03:43:46 UTC ---
The move that is generated in the split should be in the bigger mode.  And then
apply the following patch:
        * regrename.c (maybe_mode_change): Return the reg in the
        new mode if the copy was done in the same mode size.
Index: regrename.c
===================================================================
--- regrename.c    (revision 55954)
+++ regrename.c    (revision 55955)
@@ -1322,6 +1322,15 @@ maybe_mode_change (enum machine_mode ori
            enum machine_mode new_mode, unsigned int regno,
            unsigned int copy_regno ATTRIBUTE_UNUSED)
 {
+  /*  If we are using the register in the copy mode (if the number of hard
+      registers is the same), just used the reg with the new mode.  */
+  if (GET_MODE_SIZE (copy_mode) == GET_MODE_SIZE (new_mode)
+      && hard_regno_nregs[copy_regno][copy_mode] ==
+     hard_regno_nregs[copy_regno][new_mode]
+      && hard_regno_nregs[regno][copy_mode] ==
+     hard_regno_nregs[copy_regno][new_mode])
+    return gen_rtx_raw_REG (new_mode, regno);
+
   if (GET_MODE_SIZE (copy_mode) < GET_MODE_SIZE (orig_mode)
       && GET_MODE_SIZE (copy_mode) < GET_MODE_SIZE (new_mode))
     return NULL_RTX;

This will at least remove it with -frename-registers which we most likely
should have on by default at -O2 and above now anyways.


  parent reply	other threads:[~2011-11-24  3:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-22 14:15 [Bug target/50829] New: " marc.glisse at normalesup dot org
2011-10-22 16:10 ` [Bug target/50829] " ubizjak at gmail dot com
2011-10-22 17:02 ` marc.glisse at normalesup dot org
2011-10-23  8:21 ` marc.glisse at normalesup dot org
2011-10-23  8:33 ` [Bug rtl-optimization/50829] " ubizjak at gmail dot com
2011-11-24  3:48 ` vmakarov at redhat dot com
2011-11-24  5:26 ` pinskia at gcc dot gnu.org [this message]
2011-11-24  7:20 ` [Bug target/50829] " vmakarov at redhat dot com
2011-11-24  7:23 ` pinskia at gcc dot gnu.org
2012-12-01 16:30 ` glisse at gcc dot gnu.org
2012-12-01 19:50 ` glisse at gcc dot gnu.org
2012-12-01 20:26 ` hjl.tools at gmail dot com
2012-12-01 22:22 ` hjl.tools at gmail dot com
2013-03-30 10:13 ` glisse at gcc dot gnu.org
2020-08-10 17:31 ` glisse at gcc dot gnu.org

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=bug-50829-4-84Lejd4DZY@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).