public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36539]  New: [4.4 regression] IRA doesn't allocate asm output being returned to eax
@ 2008-06-14  6:48 astrange at ithinksw dot com
  2008-06-14  6:49 ` [Bug target/36539] " astrange at ithinksw dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: astrange at ithinksw dot com @ 2008-06-14  6:48 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2010-01-29 20:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-14  6:48 [Bug target/36539] New: [4.4 regression] IRA doesn't allocate asm output being returned to eax astrange at ithinksw dot com
2008-06-14  6:49 ` [Bug target/36539] " astrange at ithinksw dot com
2008-06-14  6:53 ` [Bug target/36539] " pinskia at gcc dot gnu dot org
2008-08-27  4:42 ` [Bug target/36539] [4.4 regression] " astrange at ithinksw dot com
2008-08-29  4:43 ` pinskia at gcc dot gnu dot org
2008-08-29 19:19 ` vmakarov at redhat dot com
2008-09-04  4:04 ` astrange at ithinksw dot com
2008-09-09 20:15 ` [Bug target/36539] " jsm28 at gcc dot gnu dot org
2008-09-18  1:31 ` [Bug target/36539] IRA+i386 " astrange at ithinksw dot com
2008-12-05 20:09 ` astrange at ithinksw dot com
2010-01-29 11:01 ` [Bug target/36539] IRA doesn't account for earlyclobber asm conflicts law at redhat dot com
2010-01-29 20:34 ` [Bug target/36539] Poor register allocation from IRA vmakarov at redhat dot com

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).