public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/52897] gcc 4.7.0 generates worse code than gcc 3.4.6 for m68000
Date: Sat, 07 Apr 2012 10:33:00 -0000	[thread overview]
Message-ID: <bug-52897-4-43RMZNQowB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52897-4@http.gcc.gnu.org/bugzilla/>

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2012-04-07 10:33:05 UTC ---
I see two obvious performance problems in the gcc-4.7.0 code for the second
loop:

- Instead of doing memory-to-memory moves it does load;store sequences.

- GCC apparently attempted to avoid moves with 16-bit immediate offsets by
setting up a bunch of address registers sparsely in the source array and then
using auto-increment addressing modes when loading from them; that could have
been a win, but gcc had to spill one of those address registers so the code
becomes rather awful.

Neither version of gcc managed to hoist the constant destination address into
an address register, so that 32-bit immediate appears many times in the loops.


  parent reply	other threads:[~2012-04-07 10:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-07  8:36 [Bug c/52897] New: " fdarkangel at gmail dot com
2012-04-07  8:37 ` [Bug c/52897] " fdarkangel at gmail dot com
2012-04-07 10:33 ` mikpe at it dot uu.se [this message]
2013-12-18  4:35 ` [Bug target/52897] " fdarkangel at gmail dot com
2014-09-12  2:34 ` fdarkangel at gmail dot com
2014-09-13  9:57 ` mikpelinux at gmail dot com
2014-09-13 16:10 ` fdarkangel at gmail dot com
2015-01-16 19:44 ` law at redhat dot com

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-52897-4-43RMZNQowB@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).