Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java @ 9448:7b88c5e5cbd4
Add more canonicalizations for Compare and Negate nodes
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 30 Apr 2013 20:07:07 +0200 |
parents | 5e3d1a68664e |
children | 1e07d9303420 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java Tue Apr 30 20:05:21 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/NegateNode.java Tue Apr 30 20:07:07 2013 +0200 @@ -69,6 +69,10 @@ if (x() instanceof NegateNode) { return ((NegateNode) x()).x(); } + if (x() instanceof IntegerSubNode) { + IntegerSubNode sub = (IntegerSubNode) x; + return IntegerArithmeticNode.sub(sub.y(), sub.x()); + } return this; }