public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/36326]  New: gimplification of aggregate copies introduces extra aggregate copy
@ 2008-05-25 16:32 rguenth at gcc dot gnu dot org
  2008-05-25 16:48 ` [Bug middle-end/36326] " rguenth at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-25 16:32 UTC (permalink / raw)
  To: gcc-bugs

union X { int i; double x; };

int foo (union X *p)
{
  union X x = *p;
  return x.x;
}

produces

  union X x.0;

  x.0 = *p;
  x = x.0;

this is not optimized at any point.  Using a struct instead usually SRA
is able to remove the extra copy.


-- 
           Summary: gimplification of aggregate copies introduces extra
                    aggregate copy
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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

end of thread, other threads:[~2008-12-03 15:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-25 16:32 [Bug middle-end/36326] New: gimplification of aggregate copies introduces extra aggregate copy rguenth at gcc dot gnu dot org
2008-05-25 16:48 ` [Bug middle-end/36326] " rguenth at gcc dot gnu dot org
2008-05-25 17:19 ` rguenth at gcc dot gnu dot org
2008-05-27 14:29 ` matz at gcc dot gnu dot org
2008-05-28  8:06 ` pinskia at gcc dot gnu dot org
2008-12-03 15:12 ` rguenth 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).