[Bug target/44532] New: x86-64 unnecessary parameter extension
astrange at ithinksw dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 14 07:22:00 GMT 2010
Source:
int f1(short a, int b)
{
return a * b;
}
int f2(unsigned short a, int b)
{
return a * b;
}
> gcc -O3 -fomit-frame-pointer -S paramext.c
_f1:
LFB0:
movl %esi, %eax
movswl %di, %edi <-
imull %edi, %eax
ret
...
_f2:
LFB1:
movl %esi, %eax
movzwl %di, %edi <-
imull %edi, %eax
ret
AFAIK integer parameters should already be extended to int, so those
instructions are redundant. llvm doesn't generate them.
--
Summary: x86-64 unnecessary parameter extension
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: astrange at ithinksw dot com
GCC host triplet: x86_64-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44532
More information about the Gcc-bugs
mailing list