https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121595
Bug ID: 121595 Summary: fabs(a+0.0) -> fabs(a) for non trapping case Product: gcc Version: 16.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: ``` double f(double a) { return __builtin_fabs(a + 0.0); } ``` In this case adding 0.0 does not change the value. For trapping math yes it matters and for signaling nans it matters. Looks like this shows up in opencv.