Take the following code: double test (double x) { return 1.1 / x; }
With -O2 -ffast-math with 2.95.3, we get: fldl .LC0 pushl %ebp movl %esp, %ebp fdivl 8(%ebp) popl %ebp ret But with 3.3, and 4.0: pushl %ebp movl %esp, %ebp fld1 fdivl 8(%ebp) fmull .LC1 leave ret -- Summary: [3.3/3.4/4.0 Regression] suboptimal fp division with - ffast-math Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19150