changeset 2980:a0b1b22e58cd

Merge
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Tue, 14 Jun 2011 10:32:29 +0200
parents 9dfbd92bb4b8 (diff) 4db4e8cb6bd6 (current diff)
children 42681ed31c4d
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/ClipNode.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/FixedNullCheck.java graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/schedule/Schedule.java
diffstat 2 files changed, 8 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 18:41:40 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/FloatSub.java	Tue Jun 14 10:32:29 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
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IntegerSub.java	Sat Jun 11 18:41:40 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/ir/IntegerSub.java	Tue Jun 14 10:32:29 2011 +0200
@@ -82,6 +82,12 @@
                 if (c == 0) {
                     return x;
                 }
+                if (kind == CiKind.Int) {
+                    return new IntegerAdd(kind, x, Constant.forInt((int) -c, graph), graph);
+                } else {
+                    assert kind ==  CiKind.Long;
+                    return new IntegerAdd(kind, x, Constant.forLong(-c, graph), graph);
+                }
             } else if (x.isConstant()) {
                 long c = x.asConstant().asLong();
                 if (c == 0) {