use of org.graalvm.compiler.core.common.type.PrimitiveStamp in project graal by oracle.
the class PrimitiveStampBoundaryTest method testBinaryBoundaryValues.
private static void testBinaryBoundaryValues(ArithmeticOpTable.BinaryOp<?> op, HashSet<PrimitiveStamp> stamps) {
for (PrimitiveStamp v1 : stamps) {
for (PrimitiveStamp v2 : stamps) {
if (v1.getBits() == v2.getBits() && v1.getClass() == v2.getClass()) {
Stamp result = op.foldStamp(v1, v2);
Stamp v1lower = boundaryStamp(v1, false);
Stamp v1upper = boundaryStamp(v1, true);
Stamp v2lower = boundaryStamp(v2, false);
Stamp v2upper = boundaryStamp(v2, true);
checkBinaryOperation(op, result, v1lower, v2lower);
checkBinaryOperation(op, result, v1lower, v2upper);
checkBinaryOperation(op, result, v1upper, v2lower);
checkBinaryOperation(op, result, v1upper, v2upper);
}
}
}
}
Aggregations