# HG changeset patch # User Christian Wimmer # Date 1359985274 28800 # Node ID fae0b2f0279ec8c0301423ee41cf8988a602eb59 # Parent 641a4c6ac1ce96e1f00e838757f3d555a475f4ef Bugfix: ControlSplitNode can have no successor, so check for successor count instead of class diff -r 641a4c6ac1ce -r fae0b2f0279e graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ComputeProbabilityPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ComputeProbabilityPhase.java Thu Jan 31 21:55:36 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ComputeProbabilityPhase.java Mon Feb 04 05:41:14 2013 -0800 @@ -419,14 +419,14 @@ Node current = scopeStart; while (current != null) { - if (current instanceof ControlSplitNode) { + if (current.successors().count() > 1) { + assert current instanceof ControlSplitNode; ControlSplitNode controlSplit = (ControlSplitNode) current; current = getMaxProbabilitySux(controlSplit); if (((FixedNode) current).probability() < minPathProbability) { minPathProbability = ((FixedNode) current).probability(); } } else { - assert current.successors().count() <= 1; current = current.successors().first(); } }