annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/calc/IntegerConvertNode.java @ 17344:98e60bdf6d05

Use ArithmeticOpTable for primitive convert operations.
author Roland Schatz <roland.schatz@oracle.com>
date Mon, 06 Oct 2014 11:51:32 +0200
parents c9bb0da795d4
children b3c10156d3d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
1 /*
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
4 *
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
8 *
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
13 * accompanied this code).
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
14 *
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
18 *
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
21 * questions.
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
22 */
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.nodes.calc;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
24
17344
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
25 import com.oracle.graal.api.meta.*;
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
26 import com.oracle.graal.compiler.common.type.ArithmeticOpTable.IntegerConvertOp;
15198
2c0cfbf454b5 Move LIRTypeTool and Stamp to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents: 15131
diff changeset
27 import com.oracle.graal.compiler.common.type.*;
17344
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
28 import com.oracle.graal.graph.spi.*;
16841
cbd42807a31f moved NodeInfo and friends into separate com.oracle.graal.nodeinfo project so that annotation processor can be applied to the base Node class
Doug Simon <doug.simon@oracle.com>
parents: 16811
diff changeset
29 import com.oracle.graal.nodeinfo.*;
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
30 import com.oracle.graal.nodes.*;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
31 import com.oracle.graal.nodes.spi.*;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
32
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
33 /**
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
34 * An {@code IntegerConvert} converts an integer to an integer of different width.
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
35 */
16811
5d468add216f added @NodeInfo annotations to all Node classes
Doug Simon <doug.simon@oracle.com>
parents: 16248
diff changeset
36 @NodeInfo
17344
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
37 public abstract class IntegerConvertNode extends UnaryNode implements ConvertNode, ArithmeticLIRLowerable {
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
38
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
39 protected final IntegerConvertOp op;
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
40 protected final IntegerConvertOp reverseOp;
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
41
17328
c9bb0da795d4 Backed out of changeset 17322:655f3e6b467b
Doug Simon <doug.simon@oracle.com>
parents: 17327
diff changeset
42 protected final int resultBits;
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
43
17344
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
44 protected IntegerConvertNode(IntegerConvertOp op, IntegerConvertOp reverseOp, int resultBits, ValueNode input) {
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
45 super(op.foldStamp(resultBits, input.stamp()), input);
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
46 this.op = op;
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
47 this.reverseOp = reverseOp;
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
48 this.resultBits = resultBits;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
49 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
50
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
51 public int getResultBits() {
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
52 return resultBits;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
53 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
54
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
55 public int getInputBits() {
16156
0993768dfc8e new UnaryNode base class
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15756
diff changeset
56 if (getValue().stamp() instanceof IntegerStamp) {
0993768dfc8e new UnaryNode base class
Lukas Stadler <lukas.stadler@oracle.com>
parents: 15756
diff changeset
57 return ((IntegerStamp) getValue().stamp()).getBits();
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
58 } else {
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
59 return 0;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
60 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
61 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
62
17344
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
63 @Override
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
64 public Constant convert(Constant c) {
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
65 return op.foldConstant(getInputBits(), getResultBits(), c);
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
66 }
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
67
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
68 @Override
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
69 public Constant reverse(Constant c) {
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
70 return reverseOp.foldConstant(getResultBits(), getInputBits(), c);
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
71 }
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
72
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
73 @Override
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
74 public boolean inferStamp() {
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
75 return updateStamp(op.foldStamp(resultBits, getValue().stamp()));
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
76 }
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
77
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
78 @Override
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
79 public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue) {
16216
388b787a5fe6 implement Canonicalizable.Unary in the UnaryNode hierarchy
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16156
diff changeset
80 if (value.stamp() instanceof IntegerStamp) {
388b787a5fe6 implement Canonicalizable.Unary in the UnaryNode hierarchy
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16156
diff changeset
81 int inputBits = ((IntegerStamp) value.stamp()).getBits();
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
82 if (inputBits == resultBits) {
16216
388b787a5fe6 implement Canonicalizable.Unary in the UnaryNode hierarchy
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16156
diff changeset
83 return value;
388b787a5fe6 implement Canonicalizable.Unary in the UnaryNode hierarchy
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16156
diff changeset
84 } else if (value.isConstant()) {
17344
98e60bdf6d05 Use ArithmeticOpTable for primitive convert operations.
Roland Schatz <roland.schatz@oracle.com>
parents: 17328
diff changeset
85 return ConstantNode.forPrimitive(stamp(), convert(forValue.asConstant()));
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
86 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
87 }
16216
388b787a5fe6 implement Canonicalizable.Unary in the UnaryNode hierarchy
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16156
diff changeset
88 return this;
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
89 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
90
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
91 public static ValueNode convert(ValueNode input, Stamp stamp) {
15756
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
92 return convert(input, stamp, false);
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
93 }
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
94
16248
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
95 public static ValueNode convert(ValueNode input, Stamp stamp, StructuredGraph graph) {
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
96 ValueNode convert = convert(input, stamp, false);
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
97 if (!convert.isAlive()) {
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
98 assert !convert.isDeleted();
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
99 convert = graph.addOrUnique(convert);
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
100 }
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
101 return convert;
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
102 }
c5b2a3c22318 refactor more Canonicalizable implementations to not add new nodes to the graph
Lukas Stadler <lukas.stadler@oracle.com>
parents: 16216
diff changeset
103
15756
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
104 public static ValueNode convertUnsigned(ValueNode input, Stamp stamp) {
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
105 return convert(input, stamp, true);
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
106 }
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
107
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
108 public static ValueNode convert(ValueNode input, Stamp stamp, boolean zeroExtend) {
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
109 IntegerStamp fromStamp = (IntegerStamp) input.stamp();
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
110 IntegerStamp toStamp = (IntegerStamp) stamp;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
111
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
112 ValueNode result;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
113 if (toStamp.getBits() == fromStamp.getBits()) {
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
114 result = input;
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
115 } else if (toStamp.getBits() < fromStamp.getBits()) {
16895
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
116 result = NarrowNode.create(input, toStamp.getBits());
15756
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
117 } else if (zeroExtend) {
10830a8ab30d ConditionalNode's boolean materialization canonicalization needs to insert a convert
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 15413
diff changeset
118 // toStamp.getBits() > fromStamp.getBits()
16895
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
119 result = ZeroExtendNode.create(input, toStamp.getBits());
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
120 } else {
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
121 // toStamp.getBits() > fromStamp.getBits()
16895
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
122 result = SignExtendNode.create(input, toStamp.getBits());
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
123 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
124
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
125 IntegerStamp resultStamp = (IntegerStamp) result.stamp();
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
126 assert toStamp.getBits() == resultStamp.getBits();
15131
9c1e53adc159 Remove unsigned flag from IntegerStamp.
Roland Schatz <roland.schatz@oracle.com>
parents: 14707
diff changeset
127 return result;
14000
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
128 }
958c99d0790c Split convert node into separate nodes for different conversions.
Roland Schatz <roland.schatz@oracle.com>
parents:
diff changeset
129 }