https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103264

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Aha, I see it.  The difference with IPA modref is that we now eliminate the
loop before profile instrumentation.  This leads to difference because the
function t() is never executed and thus we use guessed profile on it.

Now without modref we are not able to optimize out the loop and we actualy
profile it and then scale down the profile to zero.  This makes the cunrolli
updating bug to disappear and also shows weird behaviour of profile scaling -
when we get count to 0 we should maintain local profile.

So to get back to the original behaviour we want to add -fno-ipa-modref but
there are at least two other issues - the cunrolli misupading profile (which if
I recall may be partly intentional) and profile scalling killing local profile
when dropping count to 0.

Reply via email to