# HG changeset patch # User Gilles Duboscq # Date 1308038589 -7200 # Node ID 9dfbd92bb4b8d047843b2e592268be3b91c8a46c # Parent 53a8754c8eef6cc32bf1c8b8969de5a9006c294e amend to last commit diff -r 53a8754c8eef -r 9dfbd92bb4b8 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/FloatSub.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/FloatSub.java Sat Jun 11 13:58:51 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/FloatSub.java Tue Jun 14 10:03:09 2011 +0200 @@ -83,12 +83,14 @@ if (c == 0.0f) { return x; } + return new FloatAdd(kind, x, Constant.forFloat(-c, graph), sub.isStrictFP(), graph); } else { assert kind == CiKind.Double; double c = y.asConstant().asDouble(); if (c == 0.0) { return x; } + return new FloatAdd(kind, x, Constant.forDouble(-c, graph), sub.isStrictFP(), graph); } } else if (x.isConstant()) { // TODO (gd) check that Negate impl for floating point is really faster/better than 0.0 - x