I don't know what this optimization is called but we miss the removal of the load of a global variable:
int t; int g(int); int f(int tt) { if (tt) t = 2; else t = 3; return g(t); } I should note I found this while looking at LAPACK. -- Summary: Missed removal of load Product: gcc Version: 4.2.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=25553