use of org.graalvm.compiler.core.common.type.IntegerStamp in project graal by oracle.
the class IntegerSubOverflowsTest method testOverflowCheckStamp10.
@Test
public void testOverflowCheckStamp10() {
IntegerStamp s1 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MIN_VALUE);
IntegerStamp s2 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MIN_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 testOverflowCheckStamp01.
@Test
public void testOverflowCheckStamp01() {
IntegerStamp s1 = StampFactory.forInteger(32, Integer.MAX_VALUE, Integer.MAX_VALUE);
IntegerStamp s2 = StampFactory.forInteger(32, Integer.MAX_VALUE, Integer.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 testOverflowBIgStamps01.
@Test
public void testOverflowBIgStamps01() {
IntegerStamp s1 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MAX_VALUE);
IntegerStamp s2 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MAX_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 testOverflowCheckStamp02.
@Test
public void testOverflowCheckStamp02() {
IntegerStamp s1 = StampFactory.forInteger(32, Integer.MIN_VALUE, Integer.MIN_VALUE);
IntegerStamp s2 = StampFactory.forInteger(32, Integer.MIN_VALUE, Integer.MIN_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 testOverflowCheckStamp11.
@Test
public void testOverflowCheckStamp11() {
IntegerStamp s1 = StampFactory.forInteger(64, Long.MIN_VALUE, Long.MIN_VALUE);
IntegerStamp s2 = StampFactory.forInteger(64, 1, 1);
Assert.assertTrue(IntegerStamp.subtractionCanOverflow(s1, s2));
}
Aggregations