https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83023
Bug ID: 83023 Summary: branch probabilities pessimize malloc Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- Created attachment 42625 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42625&action=edit exemplar on x86_64 compiled with -O2 -fdump-tree-all, the ma.cc.046t.profile_estimate contains: r_5 = malloc (s_3(D)); if (r_5 != 0B) goto <bb 3>; [53.47%] else goto <bb 4>; [46.53%] That's a pretty inaccurate guess at the behaviour of malloc!