https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105338
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, in both the first and second function if_info->original_cost is smaller than seq_cost of the new sequence, but in the first function if_info->max_seq_cost is larger than seq_cost of the new sequence, in the second it is 0. And the reason for that difference is that predictable_p is true in the second function and not the first one, I presume because of the negative return value predictor that predicts returning -2 as unlikely. But if the negative value return heuristic is right (at least most of the time), then using conditional jump seems to be the right choice.