Because it only handles stores through direct INDIRECT_REFs. So while we handle testcases like loadpre4.c:
int main(int *a, int argc) { int b; int c; int i; int d, e; for (i = 0; i < argc; i++) { e = *a; *a = 9; } return d + e; } the much simpler int a; int foo(int argc) { int b; int c; int i; int d, e; for (i = 0; i < argc; i++) { e = a; a = 9; } return d + e; } or the only slightly more complex struct { int a; int large[100]; } x; int foo(int argc) { int b; int c; int i; int d, e; for (i = 0; i < argc; i++) { e = x.a; x.a = 9; } return d + e; } is not handled. If you disable insertion of fake stores completely, only two loadpre tests fail in tree-ssa.exp. Did the new SCCVN obsolete some cases where we needed the fake stores before but do not so now? -- Summary: PREs insert_fake_stores is mostly useless 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: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34677