public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/19945] New: [4.0 Regression] inefficient store of constant into a global register
@ 2005-02-14 11:36 giovannibajo at libero dot it
  2005-02-14 11:38 ` [Bug c/19945] " giovannibajo at libero dot it
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2005-02-14 11:36 UTC (permalink / raw)
  To: gcc-bugs

----------------------------
int a;
void foo(void)
{
  a = 10;
}
----------------------------

when compiled with GCC 4.0 20050118, with -O2 -fomit-frame-pointer, generates 
the following code:

foo:
        movl    $10, %eax
        movl    %eax, a
        ret

Notice the unnecessary which wastes a register.  With 3.4, we get the expected 
code:

foo:
        movl    $10, a
        ret

-- 
           Summary: [4.0 Regression] inefficient store of constant into a
                    global register
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: x86-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19945


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

end of thread, other threads:[~2005-02-14  0:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-14 11:36 [Bug c/19945] New: [4.0 Regression] inefficient store of constant into a global register giovannibajo at libero dot it
2005-02-14 11:38 ` [Bug c/19945] " giovannibajo at libero dot it
2005-02-14 11:46 ` [Bug target/19945] " pinskia at gcc dot gnu dot org
2005-02-14 12:01 ` pinskia at gcc dot gnu dot org
2005-02-14 12:01 ` pinskia at gcc dot gnu dot org
2005-02-14 13:36 ` [Bug target/19945] Inefficient " giovannibajo at libero dot it
2005-02-14 13:36 ` [Bug target/19945] inefficient " pinskia at gcc dot gnu dot org
2005-02-14 13:43 ` [Bug target/19945] Inefficient " giovannibajo at libero dot it
2005-02-14 13:45 ` pinskia at gcc dot gnu dot org
2005-02-14 13:46 ` steven at gcc dot gnu dot org

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