This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/6585] Redundant store/load instruction pairs on ix86
- From: "bruno at clisp dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2004 11:55:28 -0000
- Subject: [Bug rtl-optimization/6585] Redundant store/load instruction pairs on ix86
- References: <20020506130600.6585.bruno@clisp.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bruno at clisp dot org 2004-10-11 11:55 -------
This result is even better: shorter than the previous ones, and there are
no useless moves between registers any more.
However, there are more useless moves from register to stack slot and back
from stack slot to register. They could be eliminated.
Commented listing:
mul:
subl $20, %esp
movl 32(%esp), %ecx b0
movl 24(%esp), %eax a0
movl %ebx, 8(%esp) ; save %ebx
movl 36(%esp), %ebx b1
movl %edi, 12(%esp) ; save %edi
movl 24(%esp), %edi a0
movl %ebp, 16(%esp) ; save %ebp
mull %ecx %edx:%eax := a0*b0
imull 28(%esp), %ecx a1*b0
imull %ebx, %edi a0*b1
movl 8(%esp), %ebx ; restore %ebx
movl %edx, %ebp hi
movl %eax, (%esp) USELESS!
addl %edi, %ebp hi+a0*b1
movl (%esp), %eax USELESS!
leal (%ebp,%ecx), %ecx hi+a0*b1+a1*b0 COULD GO INTO %edx
DIRECTLY
movl 12(%esp), %edi ; restore %edi
movl %ecx, 4(%esp) USELESS!
movl 16(%esp), %ebp ; restore %ebp
movl 4(%esp), %edx USELESS!
addl $20, %esp
ret
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6585