changeset 21756:30b4de402a58

Fix a regression caused by the implicit null check changes.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 05 Jun 2015 17:11:50 +0200
parents ce6b8ee2c6f2
children f60f7994c5a5
files graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java	Thu Jun 04 16:15:14 2015 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/GuardLoweringPhase.java	Fri Jun 05 17:11:50 2015 +0200
@@ -119,12 +119,11 @@
             if (guard != null && isImplicitNullCheck(access.accessLocation())) {
                 if (object instanceof PiNode) {
                     PiNode piNode = (PiNode) object;
-                    if (access.object() == object) {
-                        access.asNode().replaceFirstInput(object, piNode.getOriginalNode());
-                    }
-                    if (!(piNode.getGuard() instanceof GuardNode)) {
-                        return;
-                    }
+                    assert piNode.getGuard() instanceof GuardNode;
+                    assert access.object() == object;
+                    access.asNode().replaceFirstInput(object, piNode.getOriginalNode());
+                } else {
+                    assert guard instanceof GuardNode;
                 }
                 metricImplicitNullCheck.increment();
                 access.setGuard(null);
@@ -154,7 +153,7 @@
                 if (condition.hasNoUsages()) {
                     GraphUtil.killWithUnusedFloatingInputs(condition);
                 }
-                nullGuarded.remove(fixedAccess.object());
+                nullGuarded.remove(object);
             }
         }