public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/45685]  New: GCC optimizer for Intel x64 generates inefficient code
@ 2010-09-16  1:17 ekuznetsov at divxcorp dot com
  2010-09-16  1:19 ` [Bug rtl-optimization/45685] " ekuznetsov at divxcorp dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ekuznetsov at divxcorp dot com @ 2010-09-16  1:17 UTC (permalink / raw)
  To: gcc-bugs

I've attached two copies of a simple function. They are identical except for
the type of the internal variable (one uses 'int64_t', the other uses 'int').
When compiled with GCC 4.4.3 on a x64 platform using -O3 optimizations, the
assembly code for the first version will contain a conditional move instruction
'cmov', the second version will contain a branch. Since branches are extremely
slow, the second version ends up two times slower than the first version.


-- 
           Summary: GCC optimizer for Intel x64 generates inefficient code
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ekuznetsov at divxcorp dot com


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-17 13:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-16  1:17 [Bug rtl-optimization/45685] New: GCC optimizer for Intel x64 generates inefficient code ekuznetsov at divxcorp dot com
2010-09-16  1:19 ` [Bug rtl-optimization/45685] " ekuznetsov at divxcorp dot com
2010-09-16 23:09 ` ekuznetsov at divxcorp dot com
2010-09-17  9:59 ` ubizjak at gmail dot com
2010-09-17 10:03 ` ubizjak at gmail dot com
2010-09-17 13:04 ` [Bug rtl-optimization/45685] [4.6 Regression] " hjl dot tools at gmail dot com
2010-09-17 13:45 ` matz at gcc dot gnu dot 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).