Search in sources :

Example 1 with Div

use of org.graalvm.compiler.core.common.type.ArithmeticOpTable.BinaryOp.Div in project graal by oracle.

the class FloatDivNode method create.

public static ValueNode create(ValueNode x, ValueNode y, NodeView view) {
    BinaryOp<Div> op = ArithmeticOpTable.forStamp(x.stamp(view)).getDiv();
    Stamp stamp = op.foldStamp(x.stamp(view), y.stamp(view));
    ConstantNode tryConstantFold = tryConstantFold(op, x, y, stamp, view);
    if (tryConstantFold != null) {
        return tryConstantFold;
    }
    return canonical(null, op, x, y);
}
Also used : Div(org.graalvm.compiler.core.common.type.ArithmeticOpTable.BinaryOp.Div) ConstantNode(org.graalvm.compiler.nodes.ConstantNode) Stamp(org.graalvm.compiler.core.common.type.Stamp) FloatStamp(org.graalvm.compiler.core.common.type.FloatStamp)

Aggregations

Div (org.graalvm.compiler.core.common.type.ArithmeticOpTable.BinaryOp.Div)1 FloatStamp (org.graalvm.compiler.core.common.type.FloatStamp)1 Stamp (org.graalvm.compiler.core.common.type.Stamp)1 ConstantNode (org.graalvm.compiler.nodes.ConstantNode)1