diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java @ 12542:7cf8b577b6e1

Fix integer stamp join for downMask/lowerBound
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 23 Oct 2013 16:51:01 +0200
parents 535403a95e65
children 524afdbe0612
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Wed Oct 23 15:44:39 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Wed Oct 23 16:51:01 2013 +0200
@@ -185,7 +185,9 @@
             return StampFactory.illegal(Kind.Illegal);
         }
         IntegerStamp other = (IntegerStamp) otherStamp;
-        return createStamp(other, Math.min(upperBound, other.upperBound), Math.max(lowerBound, other.lowerBound), downMask | other.downMask, upMask & other.upMask);
+        long newDownMask = downMask | other.downMask;
+        long newLowerBound = Math.max(lowerBound, other.lowerBound) | newDownMask;
+        return createStamp(other, Math.min(upperBound, other.upperBound), newLowerBound, newDownMask, upMask & other.upMask);
     }
 
     @Override