https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65950
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Basically this code in predict.c:
if ((gimple_call_flags (stmt) & ECF_NORETURN)
&& has_return_edges)
predict_paths_leading_to (bb, PRED_NORETURN,
NOT_TAKEN);
Needs to check if this is a BUILT_IN_EXIT, BUILT_IN__EXIT or BUILT_IN__EXIT2
and if the argument is a constant value of 0, don't predict it as not taken.
After dinner I can code something up.
