public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49599] New: FRE/DSE not performing well on aggregates
@ 2011-06-30 22:18 jamborm at gcc dot gnu.org
  2011-12-16  0:46 ` [Bug tree-optimization/49599] " pinskia at gcc dot gnu.org
  2011-12-16  9:20 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jamborm at gcc dot gnu.org @ 2011-06-30 22:18 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: FRE/DSE not performing well on aggregates
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jamborm@gcc.gnu.org


In the following testcase:

struct S
{
  int i;
  unsigned short f1;
  char f2;
  unsigned short f3[2], f4;
};

int foo (struct S *p)
{
  struct S l;

  l = *p;
  l.i++;
  *p = l;
}

in which SRA does not do total scalarization because of the array in
the aggregate (we do it only for structures), the optimized dump looks
like this:

foo (struct S * p)
{
  int l$i;
  struct S l;
  int D.1967;

<bb 2>:
  l = *p_1(D);
  l$i_6 = p_1(D)->i;
  D.1967_3 = l$i_6 + 1;
  *p_1(D) = l;
  p_1(D)->i = D.1967_3;
  return;
}

The loads and stores from and to l should be eliminated, probably by
FRE and DSE.


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

end of thread, other threads:[~2011-12-16  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30 22:18 [Bug tree-optimization/49599] New: FRE/DSE not performing well on aggregates jamborm at gcc dot gnu.org
2011-12-16  0:46 ` [Bug tree-optimization/49599] " pinskia at gcc dot gnu.org
2011-12-16  9:20 ` rguenth at gcc dot gnu.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).