https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83178
--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> --- We create an additional clone because the edge that brings the context now satisfies maybe_hot_p and previously it didn't. The reason is that the caller (which is called sort) now has frequency NODE_FREQUENCY_EXECUTED_ONCE whereas previously it was NODE_FREQUENCY_UNLIKELY_EXECUTED. sort in term is a static function called from an externally visible update_sources with frequency NODE_FREQUENCY_NORMAL and looks like: int *e; void update_sources() { if (e) { C f; sort(f, b); } } I am not sure I understand why this should mean that sort is only likely to be executed once but it does not seem to be any worse than the previous value. I'll prepare the patch adjusting the test.