https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80197
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #4 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
According to my analysis, this is mostly caused by different inlining decisions
with regards to inlining new_Random_seed into MonteCarlo_integrate. Inlining
happens at profile-generate time, but does not happen at profile-use time.
This appears to throw off edge probabilities, and also prevents the compiler
from seeing that R->haveRange accessed in Random_nextDouble (which is inlined)
is always 0.
Declaring new_Random_seed (which is called once) as 'inline
__attribute__((always_inline))' makes code generation sane again.