Fix thinko (PR tree-optimization/87201).

2018-09-03  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/87201
	* tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
	Fix parenthesis in an expression.

From-SVN: r264058
This commit is contained in:
Martin Liska 2018-09-03 15:35:35 +02:00 committed by Martin Liska
parent 70fc129d86
commit a6b75a69da
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2018-09-03 Martin Liska <mliska@suse.cz>
PR tree-optimization/87201
* tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
Fix parenthesis in an expression.
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87197

View File

@ -1942,8 +1942,8 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head,
/* Skip nodes while their probability does not reach
that amount. */
prob -= (*npp)->m_c->m_prob;
if (prob.initialized_p ()
&& (prob < pivot_prob || ! (*npp)->m_right))
if ((prob.initialized_p () && prob < pivot_prob)
|| ! (*npp)->m_right)
break;
npp = &(*npp)->m_right;
}