# HG changeset patch # User Gilles Duboscq # Date 1334065734 -7200 # Node ID 155f8ca28f1142d98e0a0a2b435653f3cefbbde8 # Parent d066f83db303cb97d3f5f4d60b45a223a33c2c8a Fix for peeling : fix a bug in the Virtual chain reconstruction diff -r d066f83db303 -r 155f8ca28f11 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/loop/SuperBlock.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/loop/SuperBlock.java Tue Apr 10 14:06:02 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/loop/SuperBlock.java Tue Apr 10 15:48:54 2012 +0200 @@ -204,8 +204,12 @@ private static ValueProxyNode findProxy(ValueNode value, BeginNode proxyPoint) { for (ValueProxyNode vpn : proxyPoint.proxies()) { - if (GraphUtil.unProxify(vpn) == value) { - return vpn; + ValueNode v = vpn; + while (v instanceof ValueProxyNode) { + v = ((ValueProxyNode) v).value(); + if (v == value) { + return vpn; + } } } return null; @@ -233,7 +237,7 @@ ValueProxyNode inputProxy = findProxy(value, earlyExit); if (inputProxy != null) { ValueProxyNode newInputProxy = findProxy(newValue, newEarlyExit); - assert newInputProxy != null; + assert newInputProxy != null : "no proxy for " + newValue + " at " + newEarlyExit; valuePhi.addInput(inputProxy); valuePhi.addInput(newInputProxy); } else {