Search in sources :

Example 1 with Shl

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

the class LeftShiftNode method create.

public static ValueNode create(ValueNode x, ValueNode y, NodeView view) {
    ArithmeticOpTable.ShiftOp<Shl> op = ArithmeticOpTable.forStamp(x.stamp(view)).getShl();
    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);
}
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) Shl(org.graalvm.compiler.core.common.type.ArithmeticOpTable.ShiftOp.Shl) ValueNode(org.graalvm.compiler.nodes.ValueNode)

Aggregations

ArithmeticOpTable (org.graalvm.compiler.core.common.type.ArithmeticOpTable)1 Shl (org.graalvm.compiler.core.common.type.ArithmeticOpTable.ShiftOp.Shl)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