From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29596 invoked by alias); 22 Nov 2008 19:10:38 -0000 Received: (qmail 16881 invoked by uid 48); 22 Nov 2008 19:09:17 -0000 Date: Sat, 22 Nov 2008 19:10:00 -0000 Subject: [Bug tree-optimization/38230] New: SCCVN doesn't do expression lookups during stmt walks X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg01925.txt.bz2 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