https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83023
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-11-19 CC| |mliska at suse dot cz Ever confirmed|0 |1 --- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> --- We get: Predictions for bb 2 DS theory heuristics: 53.5% combined heuristics: 53.5% pointer (on trees) heuristics of edge 2->3: 70.0% call heuristics of edge 2->3: 33.0% We do not know that malloc is likely returning non-NULL, but we predict with 70% that pointer is non-NULL but in the testcase this prediction is overwritten with call heuristics. builtin_expect code can be easily extended to handle builtins that likely return given value. I am adding Martin to CC as this may be part of predictor retuning this time.