# HG changeset patch # User Bernhard Urban # Date 1385664888 -3600 # Node ID c50290e743f9a552a2615147e8d33bc9a0347f06 # Parent 1b9aaf25c609a1b97681efc36711042ad84cce99 Canonicalizer: when replacing a fixed node with a controlsink, set the next of the replacee *before* calling killCFG() (GRAAL-609) diff -r 1b9aaf25c609 -r c50290e743f9 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Thu Nov 28 19:52:05 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Thu Nov 28 19:54:48 2013 +0100 @@ -302,9 +302,8 @@ FixedNode fixed = (FixedNode) node; if (canonical instanceof ControlSinkNode) { // case 7 - FixedWithNextNode pred = (FixedWithNextNode) node.predecessor(); + fixed.predecessor().replaceFirstSuccessor(fixed, canonical); GraphUtil.killCFG(fixed); - pred.setNext((FixedNode) canonical); return true; } else { assert fixed instanceof FixedWithNextNode;