> > After the change, edges that fail the predicate contribute REG_BR_PROB_BASE in > the upper hunk, but 0 in the lower hunk. Before the change, they contributed 0 > in both cases. > > The following patch should restore things: > > diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c > index dd72828..fa88259 100644 > --- a/gcc/sel-sched-ir.c > +++ b/gcc/sel-sched-ir.c > @@ -4747,8 +4747,10 @@ compute_succs_info (insn_t insn, short flags) > sinfo->probs_ok.safe_push ( > /* FIXME: Improve calculation when skipping > inner loop to exits. */ > - si.bb_end && si.e1->probability.initialized_p () > - ? si.e1->probability.to_reg_br_prob_base () > + si.bb_end > + ? (si.e1->probability.initialized_p () > + ? si.e1->probability.to_reg_br_prob_base () > + : 0) > : REG_BR_PROB_BASE); > sinfo->succs_ok_n++; > }
Ah, thanks! This looks OK to me. I was not quite sure what to do with missing probabilities in this case. Honza