public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44382]  New: Slow integer multiply
@ 2010-06-02 15:04 hjl dot tools at gmail dot com
  2010-06-02 15:15 ` [Bug middle-end/44382] " rguenth at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-06-02 15:04 UTC (permalink / raw)
  To: gcc-bugs

For

---
extern int a, b, c, d, e, f;

void
foo ()
{
  a = f * b * c * d;
}
---

on Linux/x86-64, gcc generates:

        movl    b(%rip), %eax
        imull   f(%rip), %eax
        imull   c(%rip), %eax
        imull   d(%rip), %eax
        movl    %eax, a(%rip)
        ret

Icc generates:

        movl      c(%rip), %eax                                 #6.15
        movl      f(%rip), %edx                                 #6.7
        imull     d(%rip), %eax                                 #6.19
        imull     b(%rip), %edx                                 #6.11
        imull     %eax, %edx                                    #6.15
        movl      %edx, a(%rip)                                 #6.3
        ret                                                     #7.1

Icc version is faster since 2 multiplications may
be issued at the same time.


-- 
           Summary: Slow integer multiply
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <bug-44382-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-10-21 14:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-02 15:04 [Bug middle-end/44382] New: Slow integer multiply hjl dot tools at gmail dot com
2010-06-02 15:15 ` [Bug middle-end/44382] " rguenth at gcc dot gnu dot org
2010-06-04 13:08 ` hjl dot tools at gmail dot com
2010-06-04 13:21 ` rguenth at gcc dot gnu dot org
2010-06-04 13:57 ` hjl dot tools at gmail dot com
2010-06-04 14:40 ` hjl dot tools at gmail dot com
2010-09-15  4:29 ` hjl dot tools at gmail dot com
     [not found] <bug-44382-4@http.gcc.gnu.org/bugzilla/>
2011-07-12 17:34 ` wschmidt at gcc dot gnu.org
2011-09-06 16:54 ` hjl at gcc dot gnu.org
2011-10-13 17:30 ` wschmidt at gcc dot gnu.org
2011-10-21 14:42 ` wschmidt at gcc dot gnu.org

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).