public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug regression/16457] New: PowerPC - Combine two rldicr instructions into a single rlwinm.
Date: Fri, 09 Jul 2004 18:05:00 -0000	[thread overview]
Message-ID: <20040709175338.16457.steinmtz@us.ibm.com> (raw)

Description:
A non-optimal code sequence is illustrated.  Two rlidcr instructions could
be replaced by a single rlwinm.  Duplicate using gcc 3.5 and command line:

gcc -O3 -m64 -c test.c

Testcase:
char *q;

void foo (char *p) {
  unsigned int x;
  q = p - (x & ~1);
}

Assembly:
      rldicr 0,0,32,31
      ld 9,.LC0@toc(2)
      rldicr 0,0,32,62
      subf 3,0,3
      std 3,0(9)
      blr

  The two rldicr instructions can be combined into one rlwinm
  with the resulting code looking like this:

      ld 9,.LC0@toc(2)
     rlwinm 0,0,0,0,30
     subf 3,0,3
     std 3,0(9)
     blr



-- 
           Summary: PowerPC - Combine two rldicr instructions into a single
                    rlwinm.
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P1
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steinmtz at us dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org,steinmtz at us dot ibm
                    dot com
 GCC build triplet: powerpc64-linux
  GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux


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


             reply	other threads:[~2004-07-09 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-09 18:05 gcc-bugzilla at gcc dot gnu dot org [this message]
2004-07-09 18:57 ` [Bug target/16457] " pinskia at gcc dot gnu dot org
2004-07-09 19:12 ` pinskia at gcc dot gnu dot org
2004-11-03 14:50 ` nathan at gcc dot gnu dot org
2004-11-03 15:41 ` pinskia at gcc dot gnu dot org
2004-11-11 16:59 ` nathan at gcc dot gnu dot org
2004-11-11 17:01 ` pinskia at gcc dot gnu dot org
2004-11-11 17:04 ` cvs-commit at gcc dot gnu dot 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=20040709175338.16457.steinmtz@us.ibm.com \
    --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).