This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/17236] inefficient code for long long multiply on x86


------- Additional Comments From giovannibajo at libero dot it  2004-10-06 23:27 -------
Confirmed. The code is know a little bit better:

LLM:
     pushl      %ebp
     pushl      %edi
     pushl      %ebx
     subl       $8, %esp
     movl       32(%esp), %ecx
     movl       36(%esp), %ebx
     movl       24(%esp), %eax
     mull       %ecx
     movl       %eax, (%esp)
     movl       24(%esp), %edi
     imull      %ebx, %edi
     movl       %edx, %ebp
     addl       %edi, %ebp
     imull      28(%esp), %ecx
     leal       (%ebp,%ecx), %ecx
     movl       %ecx, 4(%esp)
     movl       (%esp), %eax
     movl       4(%esp), %edx
     addl       $8, %esp
     popl       %ebx
     popl       %edi
     popl       %ebp
     ret
     .size      LLM, .-LLM
     .ident     "GCC: (GNU) 4.0.0 20041003 (experimental)"




On 2.95, we used to emit:

LLM:
     pushl %ebp
     pushl %edi
     pushl %esi
     pushl %ebx
     movl 20(%esp),%ecx
     movl 24(%esp),%ebx
     movl 28(%esp),%eax
     movl 32(%esp),%esi
     mull %ecx
     movl %eax,%edi
     movl 28(%esp),%eax
     imull %ecx,%esi
     imull %ebx,%eax
     movl %edx,%ebp
     addl %esi,%ebp
     addl %eax,%ebp
     movl %edi,%eax
     movl %ebp,%edx
     popl %ebx
     popl %esi
     popl %edi
     popl %ebp
     ret
.Lfe1:
     .size       LLM,.Lfe1-LLM
     .ident     "GCC: (GNU) 2.95.3 20010315 (release)"



Not a regression, and ICC does so much better.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |missed-optimization
      Known to fail|                            |2.95.3 3.0.4 3.3.3 3.4.1
                   |                            |4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-06 23:27:47
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]