# HG changeset patch # User Thomas Wuerthinger # Date 1311801420 25200 # Node ID 0478ad72d2143ab83e0fa4167d3d90343440d998 # Parent 399aa66d375e4cdef929e01b05e0d3c0d28cde57 Fixed a () type bug in the negate canonicalizer. diff -r 399aa66d375e -r 0478ad72d214 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Negate.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Negate.java Wed Jul 27 14:16:38 2011 -0700 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/Negate.java Wed Jul 27 14:17:00 2011 -0700 @@ -128,7 +128,7 @@ case Double: return Constant.forDouble(-x.asConstant().asDouble(), graph); } } - if (x instanceof Negate && x.kind == CiKind.Int || x.kind == CiKind.Long) { + if (x instanceof Negate && (x.kind == CiKind.Int || x.kind == CiKind.Long)) { return ((Negate) x).x(); } return negate;