changeset 19174:c154b12465d2

Fix method IntegerBelowNode#findSynonym.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 06 Feb 2015 05:22:59 +0100
parents 396ca3a22ee8
children 4cee43cd1315
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowNode.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowNode.java	Fri Feb 06 04:35:28 2015 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerBelowNode.java	Fri Feb 06 05:22:59 2015 +0100
@@ -62,6 +62,10 @@
         if (synonym != null) {
             return synonym;
         }
+        if (forX.isConstant() && forX.asJavaConstant().asLong() == 0) {
+            // 0 |<| y is the same as 0 != y
+            return new LogicNegationNode(CompareNode.createCompareNode(Condition.EQ, forX, forY));
+        }
         return this;
     }
 
@@ -79,10 +83,6 @@
                 }
             }
         }
-        if (forX.isConstant() && forX.asJavaConstant().asLong() == 0) {
-            // 0 |<| y is the same as 0 != y
-            return new LogicNegationNode(CompareNode.createCompareNode(Condition.EQ, forX, forY));
-        }
         return null;
     }