public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/19581] Missed store motion on the tree level
Date: Tue, 26 Jul 2005 13:59:00 -0000	[thread overview]
Message-ID: <20050726132908.26840.qmail@sourceware.org> (raw)
In-Reply-To: <20050123014322.19581.pinskia@gcc.gnu.org>


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-07-26 13:29 -------
For a reduced array with only 4 elements (I know - this should be a --param) we
now get in .vars (with the array aliasing patch):

f (n)
{
  int n.39;
  unsigned int ivtmp.33;
  int lsm_tmp.32;
  int lsm_tmp.31;
  int lsm_tmp.30;
  int lsm_tmp.29;

<bb 0>:
  n.39 = n - 1;
  if (n.39 != 0) goto <L6>; else goto <L2>;

<L6>:;
  lsm_tmp.29 = r[2];
  lsm_tmp.30 = r[1];
  lsm_tmp.31 = r[3];
  lsm_tmp.32 = r[0];
  ivtmp.33 = 0;

<L0>:;
  lsm_tmp.32 = lsm_tmp.32 + lsm_tmp.31;
  lsm_tmp.30 = lsm_tmp.32 + lsm_tmp.30;
  lsm_tmp.29 = lsm_tmp.30 + lsm_tmp.29;
  lsm_tmp.31 = lsm_tmp.31 + lsm_tmp.29;
  ivtmp.33 = ivtmp.33 + 1;
  if (ivtmp.33 != (unsigned int) n.39) goto <L0>; else goto <L10>;

<L10>:;
  r[2] = lsm_tmp.29;
  r[1] = lsm_tmp.30;
  r[3] = lsm_tmp.31;
  r[0] = lsm_tmp.32;

<L2>:;
  return;

}

and the asm loop looks like

.L4:
        addl    %edx, %eax
        incl    %esi
        addl    %eax, %ecx
        addl    %ecx, %ebx
        addl    %ebx, %edx
        cmpl    %edi, %esi
        jne     .L4

as in exactly what you want.  Don't hold your breath for 4.1, though.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-06-09 16:37:28         |2005-07-26 13:29:06
               date|                            |


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


  parent reply	other threads:[~2005-07-26 13:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-23  1:43 [Bug tree-optimization/19581] New: Missed store monition on the tree level (on PPC in general) pinskia at gcc dot gnu dot org
2005-01-23  1:45 ` [Bug tree-optimization/19581] " pinskia at gcc dot gnu dot org
2005-01-23  1:47 ` dberlin at gcc dot gnu dot org
2005-01-23 19:27 ` steven at gcc dot gnu dot org
2005-01-23 19:30 ` [Bug tree-optimization/19581] Missed store monition on the tree level steven at gcc dot gnu dot org
2005-01-23 19:44 ` rakdver at gcc dot gnu dot org
2005-01-23 19:53 ` steven at gcc dot gnu dot org
2005-01-23 20:00 ` pinskia at gcc dot gnu dot org
2005-01-23 20:01 ` rakdver at gcc dot gnu dot org
2005-07-26 13:21 ` [Bug tree-optimization/19581] Missed store motion " dberlin at gcc dot gnu dot org
2005-07-26 13:59 ` rguenth at gcc dot gnu dot org [this message]
     [not found] <bug-19581-6528@http.gcc.gnu.org/bugzilla/>
2006-02-03 12:32 ` rguenth at gcc dot gnu dot org
2006-02-03 12:32 ` rguenth 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=20050726132908.26840.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).