This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36539] New: [4.4 regression] IRA doesn't allocate asm output being returned to eax
- From: "astrange at ithinksw dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jun 2008 06:47:34 -0000
- Subject: [Bug target/36539] New: [4.4 regression] IRA doesn't allocate asm output being returned to eax
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Using today's IRA branch (r136683), on the attached file.
> gcc -O3 -fno-pic -fomit-frame-pointer -m64 -S cabac-ret.i -fira
_get_cabac:
LFB2:
pushq %rbx
LCFI0:
movl (%rdi), %eax
movl 4(%rdi), %r8d
# 16 "cabac-ret.i" 1
#%ebx %r8d %ax 24(%rdi) %rsi
# 0 "" 2
movl %eax, (%rdi)
movl %r8d, 4(%rdi)
movl %ebx, %eax
popq %rbx
andl $1, %eax
ret
with an unnecessary mov %ebx, %eax. Without -fira:
movl (%rdi), %r8d
movl 4(%rdi), %r9d
# 16 "cabac-ret.i" 1
#%eax %r9d %r8w 24(%rdi) %rsi
# 0 "" 2
movl %r8d, (%rdi)
movl %r9d, 4(%rdi)
andl $1, %eax
ret
Both allocators don't allocate bit to eax in 32-bit mode, though all other
compilers with inline asm support I tried did. gcc 3.3 does, as well, but no
other version seemed to.
In this case it's not a problem, since changing the class to "=&a" fixes it,
but the function will be inlined a lot and I don't want to put unnecessary
constraints on it.
--
Summary: [4.4 regression] IRA doesn't allocate asm output being
returned to eax
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: astrange at ithinksw dot com
GCC target triplet: x86_64-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36539