From 9aad8d9385a8c2abd912e227b1aae0490c6ea468 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 1 Jul 2017 09:47:22 +0200 Subject: [PATCH] Patch by Alexander Monakov Patch by Alexander Monakov * sel-sched-ir.c (compute_succs_info): Handle uninitialized probabilities consistently. From-SVN: r249864 --- gcc/ChangeLog | 1 + gcc/sel-sched-ir.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) 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 -- 2.30.2