This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/6585] Redundant store/load instruction pairs on ix86
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2004 08:03:42 -0000
- Subject: [Bug 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 kazu at cs dot umass dot edu 2004-03-17 08:03 -------
With -O3 -fnew-ra -march=i686 -mtune=i686 -fomit-frame-pointer, I get:
mul:
subl $20, %esp
movl %esi, 12(%esp) ; save %esi
movl 24(%esp), %eax
movl 32(%esp), %esi
movl 28(%esp), %ecx
movl %edi, 16(%esp) ; save %edi
movl 36(%esp), %edi
movl %eax, (%esp)
mull %esi
movl %ecx, 4(%esp)
movl %ebx, 8(%esp)
movl %eax, %ecx
movl (%esp), %eax
imull %eax, %edi
movl 4(%esp), %eax
imull %esi, %eax
movl 12(%esp), %esi ; restore %esi
leal (%edx,%edi), %edi
leal (%edi,%eax), %ebx
movl 16(%esp), %edi ; restore %edi
movl %ecx, %eax
movl %ebx, %edx
movl 8(%esp), %ebx ; restore %ebx
addl $20, %esp
ret
Note that those "why not" instructions are gone.
"USELESS" instructions are gone even without -fnew-ra as of today's mainline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6585