changeset 2979:9dfbd92bb4b8

amend to last commit
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Tue, 14 Jun 2011 10:03:09 +0200
parents 53a8754c8eef
children a0b1b22e58cd
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/FloatSub.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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