From: Bernd Edlinger Date: Wed, 14 Sep 2016 07:18:53 +0000 (+0000) Subject: Add braces to a condition in predict.c (PR middle-end/77574) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=130ffea03c8226065628437f9611c029f21fcc62;p=gcc.git 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 --- 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)