Search in sources :

Example 1 with Shr

use of org.graalvm.compiler.core.common.type.ArithmeticOpTable.ShiftOp.Shr in project graal by oracle.

the class RightShiftNode method create.

public static ValueNode create(ValueNode x, ValueNode y, NodeView view) {
    ArithmeticOpTable.ShiftOp<Shr> op = ArithmeticOpTable.forStamp(x.stamp(view)).getShr();
    Stamp stamp = op.foldStamp(x.stamp(view), (IntegerStamp) y.stamp(view));
    ValueNode value = ShiftNode.canonical(op, stamp, x, y, view);
    if (value != null) {
        return value;
    }
    return canonical(null, op, stamp, x, y, view);
}
Also used : ArithmeticOpTable(org.graalvm.compiler.core.common.type.ArithmeticOpTable) Stamp(org.graalvm.compiler.core.common.type.Stamp) IntegerStamp(org.graalvm.compiler.core.common.type.IntegerStamp) ValueNode(org.graalvm.compiler.nodes.ValueNode) Shr(org.graalvm.compiler.core.common.type.ArithmeticOpTable.ShiftOp.Shr)

Aggregations

ArithmeticOpTable (org.graalvm.compiler.core.common.type.ArithmeticOpTable)1 Shr (org.graalvm.compiler.core.common.type.ArithmeticOpTable.ShiftOp.Shr)1 IntegerStamp (org.graalvm.compiler.core.common.type.IntegerStamp)1 Stamp (org.graalvm.compiler.core.common.type.Stamp)1 ValueNode (org.graalvm.compiler.nodes.ValueNode)1