https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123412
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Jambor <[email protected]>: https://gcc.gnu.org/g:54d98b104420363d8109aee1bb275f4567c756f0 commit r16-6818-g54d98b104420363d8109aee1bb275f4567c756f0 Author: Martin Jambor <[email protected]> Date: Fri Jan 16 12:04:23 2026 +0100 ipa-cp: Fix devirt bonus for targets that cannot be inlined PR 123412 has been filed because since commit r16-3990-gad3fb999a1b568 (Jan Hubicka: Improve ipa-cp devirtualization costing), there is accidentally zero devirtualization bonus for functions which cannot be inlined. This has resulted in g++.dg/ipa/devirt-2.C failing since it has been pushed because the required function is not cloned even with --param max-devirt-targets=1. The intention was that we do get at least some small benefit boost and so this patch adds an addition of the indirect edge frequency once before the early continue statements. gcc/ChangeLog: 2026-01-14 Martin Jambor <[email protected]> PR ipa/123412 * ipa-cp.cc (devirtualization_time_bonus): Do add the indirect edge frequency at least once even for targets which cannot be inlined.
