The following testcase, compiled with -O2 -ffast-math should have 1/d factored out, but doesn't, because d is a function parameter and recip walks SSA_NAME defs, and d does not have one.
double a, b; int x; double foo(double d) { if (x) a/=d; return a/d + b/d; } -- Summary: recip does not factor division by function parameter Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23133