Commit 4741e46d by Jan Hubicka Committed by Jan Hubicka

bb-reorder.c (better_edge_p): Fix handling of uninitialized probability.

	* bb-reorder.c (better_edge_p): Fix handling of uninitialized
	probability.

From-SVN: r249966
parent e5d81167
2017-07-04 Jan Hubicka <hubicka@ucw.cz>
* bb-reorder.c (better_edge_p): Fix handling of uninitialized
probability.
2017-07-04 Richard Sandiford <richard.sandiford@linaro.org> 2017-07-04 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/81292 PR tree-optimization/81292
......
...@@ -957,7 +957,7 @@ better_edge_p (const_basic_block bb, const_edge e, profile_probability prob, ...@@ -957,7 +957,7 @@ better_edge_p (const_basic_block bb, const_edge e, profile_probability prob,
return !cur_best_edge return !cur_best_edge
|| cur_best_edge->dest->index > e->dest->index; || cur_best_edge->dest->index > e->dest->index;
if (prob > best_prob + diff_prob) if (prob > best_prob + diff_prob || !best_prob.initialized_p ())
/* The edge has higher probability than the temporary best edge. */ /* The edge has higher probability than the temporary best edge. */
is_better_edge = true; is_better_edge = true;
else if (prob < best_prob - diff_prob) else if (prob < best_prob - diff_prob)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment