This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/45685] New: GCC optimizer for Intel x64 generates inefficient code
- From: "ekuznetsov at divxcorp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2010 01:17:24 -0000
- Subject: [Bug rtl-optimization/45685] New: GCC optimizer for Intel x64 generates inefficient code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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