Skip to content

Commit 91b4aaf

Browse files
committed
[GR-59957] ArrayLengthNode: ensure non alive inputs are also added to the graph.
PullRequest: graal/19377
2 parents 3b5860a + 1eef051 commit 91b4aaf

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)