Search in sources :

Example 1 with Narrow

use of org.graalvm.compiler.core.common.type.ArithmeticOpTable.IntegerConvertOp.Narrow in project graal by oracle.

the class NarrowNode method create.

public static ValueNode create(ValueNode input, int inputBits, int resultBits, NodeView view) {
    IntegerConvertOp<Narrow> signExtend = ArithmeticOpTable.forStamp(input.stamp(view)).getNarrow();
    ValueNode synonym = findSynonym(signExtend, input, inputBits, resultBits, signExtend.foldStamp(inputBits, resultBits, input.stamp(view)));
    if (synonym != null) {
        return synonym;
    } else {
        return new NarrowNode(input, inputBits, resultBits);
    }
}
Also used : ValueNode(org.graalvm.compiler.nodes.ValueNode) Narrow(org.graalvm.compiler.core.common.type.ArithmeticOpTable.IntegerConvertOp.Narrow)

Aggregations

Narrow (org.graalvm.compiler.core.common.type.ArithmeticOpTable.IntegerConvertOp.Narrow)1 ValueNode (org.graalvm.compiler.nodes.ValueNode)1