Missing code size optimization at tree level -- which is more flexible than RTL level (allow hoisting memory operations).
int g1,g2; int foo(int a, int b) { if (a) g1 = a + b; else if (b) g2 = a+ b; else g3 = a + b return g1 + g2; } With hoisting, it should be transformed into: int g1, g2, g3; int foo(int a, int b) { t = a+b; if (a) g1 = t; else if (b) g2 = t; else g3 = t; return g1 + g2; } -- Summary: Code hoisting optimization at tree level Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: xinliangli at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35303