This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/65950] exit in main is causing the path to it to become unlikely.


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]