From 130ffea03c8226065628437f9611c029f21fcc62 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Wed, 14 Sep 2016 07:18:53 +0000 Subject: [PATCH] Add braces to a condition in predict.c (PR middle-end/77574) Martin Liska PR middle-end/77574 * predict.c (force_edge_cold): Add braces to a condition. Co-Authored-By: Martin Liska From-SVN: r240128 --- gcc/ChangeLog | 6 ++++++ gcc/predict.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 97ceeb55897..a0b660b7962 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-09-14 Bernd Edlinger + Martin Liska + + PR middle-end/77574 + * predict.c (force_edge_cold): Add braces to a condition. + 2016-09-13 Bernd Edlinger PR rtl-optimization/77289 diff --git a/gcc/predict.c b/gcc/predict.c index 035a0c2e7d6..b3d169770c9 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -3723,7 +3723,7 @@ force_edge_cold (edge e, bool impossible) int prob_scale = REG_BR_PROB_BASE; /* If edge is already improbably or cold, just return. */ - if (e->probability <= impossible ? PROB_VERY_UNLIKELY : 0 + if (e->probability <= (impossible ? PROB_VERY_UNLIKELY : 0) && (!impossible || !e->count)) return; FOR_EACH_EDGE (e2, ei, e->src->succs) -- 2.30.2