https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121692
Bug ID: 121692 Summary: Inlining fails with builtin_constant_p Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: jchrist at linux dot ibm.com Target Milestone: --- Created attachment 62216 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62216&action=edit Reproducer When a function splits control flow based on __builtin_constant_p of an argument, inlining heuristic does not properly track size of the resulting function. This leads to missed inlining opertunities. Attached reproducer is an excerpt from building the Linux kernel on s390x. Here, function __flogr should be inlined into all call sites, but is not due to a large block of code in the __builtin_constant_p case.