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/6585] Redundant store/load instruction pairs on ix86
Date: Sun, 26 Jun 2005 13:35:00 -0000	[thread overview]
Message-ID: <20050626133546.20712.qmail@sourceware.org> (raw)
In-Reply-To: <20020506130600.6585.bruno@clisp.org>


------- Additional Comments From steven at gcc dot gnu dot org  2005-06-26 13:35 -------
Today's results ("-O2 -m32 -march=i686 -mtune=i686 -fomit-frame-pointer"): 
 
        .file   "t.c" 
        .text 
        .p2align 4,,15 
.globl mul 
        .type   mul, @function 
mul: 
        subl    $12, %esp               # get space to save three registers 
        movl    %ebx, (%esp)            # save %ebx 
        movl    20(%esp), %edx          # %edx <- a1  COULD GO INTO %esi 
        movl    28(%esp), %ebx          # %ebx <- b1  COULD GO INTO %edi 
        movl    16(%esp), %eax          # %eax <- a0 
        movl    24(%esp), %ecx          # %ecx <- b0 
        movl    %esi, 4(%esp)           # save %esi 
        movl    %edx, %esi              # %esi <- a1 
        movl    %edi, 8(%esp)           # save %edi 
        movl    %ebx, %edi              # %edi <- b1 
        movl    (%esp), %ebx            # restore %ebx 
        imull   %eax, %edi              # %edi <- a0*b1 
        imull   %ecx, %esi              # %esi <- b0*a1 
        mull    %ecx                    # %edx:%eax := a0*b0 
        addl    %edi, %esi              # %esi <- a0*b1 + b0*a1 
        movl    8(%esp), %edi           # restore %edi 
        leal    (%esi,%edx), %edx       # %edx <- a0*b1 + b0*a1 + hi(a0*b0) 
        movl    4(%esp), %esi           # %restore %esi 
        addl    $12, %esp               # free stack space 
        ret                             # return result in %edx:%eax 
        .size   mul, .-mul 
        .ident  "GCC: (GNU) 4.1.0 20050626 (experimental)" 
        .section        .note.GNU-stack,"",@progbits 
 
There are still the questionable moves through %ebx and %edx, but it is 
still better than before. 
 

-- 


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


  parent reply	other threads:[~2005-06-26 13:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020506130600.6585.bruno@clisp.org>
2003-07-04 11:09 ` [Bug optimization/6585] useless memory store instructions on x86 steven at gcc dot gnu dot org
2003-07-10 20:09 ` [Bug optimization/6585] Reduntant store/load instruction pairs on ix86 steven at gcc dot gnu dot org
2003-08-23  1:38 ` [Bug optimization/6585] Redundant " dhazeghi at yahoo dot com
2003-11-25  7:51 ` pinskia at gcc dot gnu dot org
2004-03-17  8:03 ` kazu at cs dot umass dot edu
2004-03-17 12:10 ` bruno at clisp dot org
2004-10-11  2:57 ` [Bug rtl-optimization/6585] " pinskia at gcc dot gnu dot org
2004-10-11 11:55 ` bruno at clisp dot org
2005-06-26 13:35 ` steven at gcc dot gnu dot org [this message]
2005-06-27 11:50 ` bruno at clisp dot org
     [not found] <bug-6585-128@http.gcc.gnu.org/bugzilla/>
2007-11-23  6:02 ` ismail at pardus dot org dot tr
2007-11-23  7:37 ` steven at gcc dot gnu dot org
2007-11-23  7:43 ` ubizjak at gmail dot com
2007-11-23 20:43 ` rask at gcc dot gnu dot org
2007-11-23 20:48 ` steven at gcc dot gnu dot org
2007-12-19 14:15 ` rask at gcc dot gnu dot org
2008-09-06 16:19 ` ubizjak at gmail 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=20050626133546.20712.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).