public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/38230]  New: SCCVN doesn't do expression lookups during stmt walks
@ 2008-11-22 19:10 rguenth at gcc dot gnu dot org
  2008-11-22 19:13 ` [Bug tree-optimization/38230] " rguenth at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-22 19:10 UTC (permalink / raw)
  To: gcc-bugs

Related to PR38207, SCCVN doesn't CSE the load of c->a in

/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre" } */

struct a
{
  union
  {
    int a;
    int b;
  };
  union
  {
    int c;
    int d;
  };
  int e;
};

int f(struct a *c)
{
  int d; 
  c->e = 2;
  d = c->a;
  c->c = 1;
  return c->a + d;
}

/* We should have CSEd the load from c->a.  */

/* { dg-final { scan-tree-dump-times "c_.*\\\.a" 1 "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */


which is because it doesn't do expression hashtable lookups for intermediate
VUSEs it walks.  Without proper caching this will probably be too expensive.


-- 
           Summary: SCCVN doesn't do expression lookups during stmt walks
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        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=38230


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

end of thread, other threads:[~2009-04-03 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-22 19:10 [Bug tree-optimization/38230] New: SCCVN doesn't do expression lookups during stmt walks rguenth at gcc dot gnu dot org
2008-11-22 19:13 ` [Bug tree-optimization/38230] " rguenth at gcc dot gnu dot org
2009-04-03 10:28 ` rguenth at gcc dot gnu dot org
2009-04-03 10:35 ` 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).