This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28405] New: 4.x code generation regression relative to 3.4.6
- From: "vda dot linux at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jul 2006 08:58:48 -0000
- Subject: [Bug c/28405] New: 4.x code generation regression relative to 3.4.6
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc 3.4.x generates a bit suboptimal code on the below fragment.
gcc 4.x generates code which is a bit more suboptimal.
unsigned v;
void g(unsigned A)
/* gcc -O2 -fomit-frame-pointer -S:
gcc-3.4.3, 3.4.6:
movl $-858993459, %eax
mull 4(%esp)
movl %edx, %eax // huh?
shrl $3, %eax
movl %eax, v
ret
gcc-4.0.0,4.1.1:
movl $-858993459, %eax
mull 4(%esp)
movl %edx, %eax // huh?
xorl %edx, %edx // huh??
shrl $3, %eax
movl %eax, v
ret
*/
{
v = (A * 3435973837ULL) >> 35;
}
--
Summary: 4.x code generation regression relative to 3.4.6
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vda dot linux at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28405