https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80265
--- Comment #34 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 45467 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45467&action=edit gcc9-pr86590.patch Untested patch to use __builtin_is_constant_evaluated() here. I believe it should help, the inliner should be able to see smaller inline functions and could make better decisions.