Skip to content

Commit 1eef051

Browse files
committed
use addOrUniqueWithInputs, inputs may not be alive
1 parent cb46485 commit 1eef051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/java/ArrayLengthNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void simplify(SimplifierTool tool) {
187187
*/
188188
public static ValueNode maybeAddPositivePi(ValueNode length, FixedWithNextNode insertionPosition) {
189189
StructuredGraph graph = insertionPosition.graph();
190-
ValueNode localLength = graph.addOrUnique(length);
190+
ValueNode localLength = graph.addOrUniqueWithInputs(length);
191191
ValueNode replacement = localLength;
192192
if (!localLength.isConstant() && localLength.stamp(NodeView.DEFAULT).canBeImprovedWith(StampFactory.positiveInt())) {
193193
ValueAnchorNode g = graph.add(new ValueAnchorNode());

0 commit comments

Comments
 (0)