int foo(int a) { int tmp = a > 2; if (a > 2) return tmp; } is not simplified.
-- Summary: FRE does not value number comparisons in COND_EXPRs 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=30997