https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118295
Bug ID: 118295 Summary: The optimization report says sqrt is not inlinable, even when it does get inlined Product: gcc Version: 15.0 URL: https://godbolt.org/z/nrqjdhd5E Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: tiborgyri at gmail dot com Target Milestone: --- See: https://godbolt.org/z/nrqjdhd5E Some inliner pass always reports sqrt as non-inlinable, even when it does get inlined, eg. on modern x86 with -ffast-math the call to the library function is reduced to a single vsqrtsd isn. My gut feeling is that the inliner pass runs much earlier and it would be difficult/hacky to try and teach such things to it. So I would suggest changing its message to begin with something like "not inlinable by inlining pass", instead of the unqualified "not inlinable", and at the same time adding an "optimization passed" opt-report message to whichever pass inlines sqrt with -fast-math. This way the final opt-report would contain both the initial inlining failure, and then the inlining success, which would make reading these reports congruent with the code being emitted.