This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures



------- Comment #7 from rguenth at gcc dot gnu dot org  2008-01-17 15:47 -------
Still broken (IMHO rightfully P2).

With 3.3 we get (x86_64):

f:
.LFB3:
        movl    $67305985, u(%rip)
        ret

while on trunk we have:

f:
.LFB2:
        movb    $1, u(%rip)
        movb    $2, u+1(%rip)
        movb    $3, u+2(%rip)
        movb    $4, u+3(%rip)
        ret

regardless of optimization flag (same for -Os and -O).  Gimplification now
produces

f ()
{
  u.a = 1;
  u.b = 2;
  u.c = 3;
  u.d = 4;
}

which makes the task of combining the initializer even harder.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2007-12-16 23:57:26         |2008-01-17 15:47:39
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]