https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104484
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- There is some heuristics going on here. If we mark the function very_heavy as cold, then GCC does almost the right thing.
pinskia at gcc dot gnu.org via Gcc-bugs Thu, 10 Feb 2022 14:19:33 -0800
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104484
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- There is some heuristics going on here. If we mark the function very_heavy as cold, then GCC does almost the right thing.