# HG changeset patch # User Roland Schatz # Date 1404822355 -7200 # Node ID a9b85fe36dbce1c13cdba2e3526c81ab9e7b8d88 # Parent 7f20dee1be603a7162216794e1696eca688714f4 Don't rewrite to trapping null checks if the FrameState has an input that's anchored to the deopting branch. diff -r 7f20dee1be60 -r a9b85fe36dbc graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java Mon Jul 07 20:27:20 2014 -0700 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/UseTrappingNullChecksPhase.java Tue Jul 08 14:25:55 2014 +0200 @@ -129,9 +129,13 @@ private static void checkPredecessor(AbstractDeoptimizeNode deopt, Node predecessor, DeoptimizationReason deoptimizationReason) { Node current = predecessor; - Node branch = null; + BeginNode branch = null; while (current instanceof BeginNode) { - branch = current; + branch = (BeginNode) current; + if (branch.anchored().isNotEmpty()) { + // some input of the deopt framestate is anchored to this branch + return; + } current = current.predecessor(); } if (current instanceof IfNode) {