use of org.graalvm.compiler.core.common.type.IntegerStamp in project graal by oracle.
the class IntegerSubOverflowsTest method testOverflowCheckStamp08.
@Test
public void testOverflowCheckStamp08() {
IntegerStamp s1 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MIN_VALUE);
IntegerStamp s2 = StampFactory.forInteger(64, -1, -1);
Assert.assertFalse(IntegerStamp.subtractionCanOverflow(s1, s2));
}
use of org.graalvm.compiler.core.common.type.IntegerStamp in project graal by oracle.
the class IntegerSubOverflowsTest method testOverflowCheckStamp05.
@Test
public void testOverflowCheckStamp05() {
IntegerStamp s1 = StampFactory.forInteger(8, Byte.MAX_VALUE, Byte.MAX_VALUE);
IntegerStamp s2 = StampFactory.forInteger(8, Byte.MAX_VALUE, Byte.MAX_VALUE);
Assert.assertFalse(IntegerStamp.subtractionCanOverflow(s1, s2));
}
use of org.graalvm.compiler.core.common.type.IntegerStamp in project graal by oracle.
the class IntegerSubOverflowsTest method testOverflowCheckStamp04.
@Test
public void testOverflowCheckStamp04() {
IntegerStamp s1 = StampFactory.forInteger(8, Byte.MIN_VALUE, Byte.MIN_VALUE);
IntegerStamp s2 = StampFactory.forInteger(8, -1, -1);
Assert.assertFalse(IntegerStamp.subtractionCanOverflow(s1, s2));
}
use of org.graalvm.compiler.core.common.type.IntegerStamp in project graal by oracle.
the class IntegerSubOverflowsTest method testOverflowBIgStamps02.
@Test
public void testOverflowBIgStamps02() {
IntegerStamp s1 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MAX_VALUE);
IntegerStamp s2 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MIN_VALUE);
Assert.assertTrue(IntegerStamp.subtractionCanOverflow(s1, s2));
}
use of org.graalvm.compiler.core.common.type.IntegerStamp in project graal by oracle.
the class IntegerSubOverflowsTest method testOverflowCheckStamp03.
@Test
public void testOverflowCheckStamp03() {
IntegerStamp s1 = StampFactory.forInteger(32, Integer.MIN_VALUE, Integer.MIN_VALUE);
IntegerStamp s2 = StampFactory.forInteger(32, 1, 1);
Assert.assertTrue(IntegerStamp.subtractionCanOverflow(s1, s2));
}
Aggregations