http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50204
Bug #: 50204 Summary: [4.5/4.6/4.7 Regression] Missed fully redundant load found in crafty (SPEC 2k) Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: pins...@gcc.gnu.org Simplified testcase: extern int opening; extern int middle_game; int s; extern int d[1]; void PreEvaluate(int wtm) { int i, j; if (opening) { d[0]=1; } else if (middle_game) { d[0]=-1; } if (4 != opening) { return; } s = 1; } --- CUT --- 4.3 catches the load of opening but 4.6 does not (4.5 does not either).