use of com.oracle.truffle.llvm.runtime.CompareOperator in project graal by oracle.
the class DebugExprNodeFactory method createCompareNode.
public DebugExpressionPair createCompareNode(DebugExpressionPair left, CompareKind op, DebugExpressionPair right) {
checkError(left, op.name());
checkError(right, op.name());
DebugExprType commonType = DebugExprType.commonType(left.getType(), right.getType());
DebugExpressionPair leftPair = createCastIfNecessary(left, commonType);
DebugExpressionPair rightPair = createCastIfNecessary(right, commonType);
CompareOperator cop;
if (commonType.isFloatingType()) {
cop = getFloatingCompareOperator(op);
} else if (commonType.isUnsigned()) {
cop = getUnsignedCompareOperator(op);
} else {
cop = getSignedCompareOperator(op);
}
LLVMExpressionNode node = CommonNodeFactory.createComparison(cop, commonType.getLLVMRuntimeType(), leftPair.getNode(), rightPair.getNode());
return DebugExpressionPair.create(node, DebugExprType.getBoolType());
}
Aggregations