public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/31982] New: Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) @ 2007-05-17 23:28 pinskia at gcc dot gnu dot org 2007-05-24 10:11 ` [Bug tree-optimization/31982] " rguenth at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: pinskia at gcc dot gnu dot org @ 2007-05-17 23:28 UTC (permalink / raw) To: gcc-bugs This testcase should pass: /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-forwprop" } */ /* We should be able to optimize this to b->t[i] = 1 during early optimizations. */ struct a { char t[10]; }; struct a *b; void f(__SIZE_TYPE__ i) { int *c = b->t; c[i] = 1; } /* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop1" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop2" } } */ /* { dg-final { cleanup-tree-dump "forwprop?" } } */ --------- I found this while fixing up forwprop for the pointer plus branch. forwprop is looking for a MULT_EXPR which does not exist in this case. -- Summary: Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31982 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/31982] Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) 2007-05-17 23:28 [Bug tree-optimization/31982] New: Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) pinskia at gcc dot gnu dot org @ 2007-05-24 10:11 ` rguenth at gcc dot gnu dot org 2007-05-24 10:22 ` rguenth at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2007-05-24 10:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from rguenth at gcc dot gnu dot org 2007-05-24 11:11 ------- Confirmed. Of course it needs to read char *c = b->t; -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-05-24 11:11:24 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31982 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/31982] Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) 2007-05-17 23:28 [Bug tree-optimization/31982] New: Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) pinskia at gcc dot gnu dot org 2007-05-24 10:11 ` [Bug tree-optimization/31982] " rguenth at gcc dot gnu dot org @ 2007-05-24 10:22 ` rguenth at gcc dot gnu dot org 2007-05-25 9:08 ` rguenth at gcc dot gnu dot org 2007-05-25 9:08 ` rguenth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2007-05-24 10:22 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from rguenth at gcc dot gnu dot org 2007-05-24 11:22 ------- I have a patch for this one. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2007-05-24 11:11:24 |2007-05-24 11:22:40 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31982 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/31982] Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) 2007-05-17 23:28 [Bug tree-optimization/31982] New: Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) pinskia at gcc dot gnu dot org 2007-05-24 10:11 ` [Bug tree-optimization/31982] " rguenth at gcc dot gnu dot org 2007-05-24 10:22 ` rguenth at gcc dot gnu dot org @ 2007-05-25 9:08 ` rguenth at gcc dot gnu dot org 2007-05-25 9:08 ` rguenth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2007-05-25 9:08 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rguenth at gcc dot gnu dot org 2007-05-25 10:07 ------- Fixed. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31982 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/31982] Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) 2007-05-17 23:28 [Bug tree-optimization/31982] New: Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) pinskia at gcc dot gnu dot org ` (2 preceding siblings ...) 2007-05-25 9:08 ` rguenth at gcc dot gnu dot org @ 2007-05-25 9:08 ` rguenth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu dot org @ 2007-05-25 9:08 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rguenth at gcc dot gnu dot org 2007-05-25 10:07 ------- Fixed. ------- Comment #4 from rguenth at gcc dot gnu dot org 2007-05-25 10:07 ------- Subject: Bug 31982 Author: rguenth Date: Fri May 25 09:07:29 2007 New Revision: 125058 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125058 Log: 2007-05-24 Richard Guenther <rguenther@suse.de> Andrew Pinski <andrew_pinski@playstation.sony.com> PR tree-optimization/31982 * tree-ssa-forwprop.c (forward_propagate_addr_into_variable_array_index): Handle arrays with element size one. * gcc.dg/tree-ssa/forwprop-2.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/forwprop-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-forwprop.c -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31982 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-25 9:08 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-05-17 23:28 [Bug tree-optimization/31982] New: Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1) pinskia at gcc dot gnu dot org 2007-05-24 10:11 ` [Bug tree-optimization/31982] " rguenth at gcc dot gnu dot org 2007-05-24 10:22 ` rguenth at gcc dot gnu dot org 2007-05-25 9:08 ` rguenth at gcc dot gnu dot org 2007-05-25 9:08 ` 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).