From: Jan Hubicka Date: Sat, 1 Jul 2017 07:47:22 +0000 (+0200) Subject: Patch by Alexander Monakov X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9aad8d9385a8c2abd912e227b1aae0490c6ea468;p=gcc.git Patch by Alexander Monakov Patch by Alexander Monakov * sel-sched-ir.c (compute_succs_info): Handle uninitialized probabilities consistently. From-SVN: r249864 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 525c2c4b93f..ce144a01b61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,6 @@ 2017-06-29 Jan Hubicka + Patch by Alexander Monakov * sel-sched-ir.c (compute_succs_info): Handle uninitialized probabilities consistently. diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index e78d30999a8..fa88259733b 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -4747,9 +4747,11 @@ 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 () - : 0); + 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++; } else