public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/19580] [3.4/4.0 Regression] missed load/store motion
Date: Sun, 23 Jan 2005 19:23:00 -0000	[thread overview]
Message-ID: <20050123192340.13851.qmail@sourceware.org> (raw)
In-Reply-To: <20050123013419.19580.belyshev@depni.sinp.msu.ru>


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-23 19:23 -------
For x86 I get this: 
g: 
        movl    r+8, %edx 
        movl    r, %eax 
        addl    %edx, %eax 
        movl    %eax, r 
        addl    r+4, %eax 
        movl    %eax, r+4 
        addl    %edx, %eax 
        movl    %eax, r+8 
        ret 
 
That is pretty much the best you can get, as far as I can tell. 
 
For AMD64 it's similar: 
 
g: 
.LFB2: 
        movl    r+8(%rip), %edx 
        movl    r(%rip), %eax 
        addl    %edx, %eax 
        movl    %eax, r(%rip) 
        addl    r+4(%rip), %eax 
        movl    %eax, r+4(%rip) 
        addl    %edx, %eax 
        movl    %eax, r+8(%rip) 
        ret 
.LFE2: 
 
I'm not sure what you think the missed optimization is here.  You will have 
to show what you want at the assembly level, and explain why you think this 
is a coalescing problem.  So far, I don't see a missed optimization. 
 
What is worse is that we fail to do store motion when you put such blocks 
inside a loop, e.g. 
 
int r[6]; 
void g (int n) 
{ 
  while (--n) 
    { 
      r [0] += r [1]; 
      r [1] += r [2]; 
      r [2] += r [0]; 
    } 
} 
 
which is the issue discussed in PR19581. 

-- 


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


  parent reply	other threads:[~2005-01-23 19:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-23  1:35 [Bug rtl-optimization/19580] New: [3.4/4.0 Regression] poor register allocation belyshev at depni dot sinp dot msu dot ru
2005-01-23  1:37 ` [Bug rtl-optimization/19580] " pinskia at gcc dot gnu dot org
2005-01-23  1:49 ` [Bug middle-end/19580] " steven at gcc dot gnu dot org
2005-01-23  1:53 ` [Bug rtl-optimization/19580] [3.4/4.0 Regression] missed load/store monition pinskia at gcc dot gnu dot org
2005-01-23  2:09 ` dberlin at dberlin dot org
2005-01-23  4:35 ` belyshev at depni dot sinp dot msu dot ru
2005-01-23  4:38 ` [Bug rtl-optimization/19580] [3.4/4.0 Regression] missed load/store motion pinskia at gcc dot gnu dot org
2005-01-23  4:39 ` pinskia at gcc dot gnu dot org
2005-01-23 11:13 ` steven at gcc dot gnu dot org
2005-01-23 14:36 ` belyshev at depni dot sinp dot msu dot ru
2005-01-23 15:25 ` pinskia at gcc dot gnu dot org
2005-01-23 15:41 ` steven at gcc dot gnu dot org
2005-01-23 15:43 ` pinskia at gcc dot gnu dot org
2005-01-23 15:51 ` steven at gcc dot gnu dot org
2005-01-23 15:56 ` steven at gcc dot gnu dot org
2005-01-23 18:32 ` belyshev at depni dot sinp dot msu dot ru
2005-01-23 19:07 ` dberlin at dberlin dot org
2005-01-23 19:11 ` steven at gcc dot gnu dot org
2005-01-23 19:23 ` steven at gcc dot gnu dot org [this message]
2005-01-23 19:51 ` belyshev at depni dot sinp dot msu dot ru
2005-02-12 23:09 ` pinskia at gcc dot gnu dot org
2005-05-19 17:31 ` [Bug rtl-optimization/19580] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-07-22 21:16 ` pinskia at gcc dot gnu dot org
2005-09-27 16:12 ` mmitchel 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=20050123192340.13851.qmail@sourceware.org \
    --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).