diff --git a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/GraphState.java b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/GraphState.java index b2c2479e9cc9..a9466cb6d2b5 100644 --- a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/GraphState.java +++ b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/GraphState.java @@ -262,7 +262,9 @@ public String updateFromPreviousToString(GraphState previous) { builder.append(valueStringAsDiff(previous.frameStateVerification, this.frameStateVerification, "Frame state verification: ", ", ")); builder.append(newFlagsToString(previous.futureRequiredStages, this.futureRequiredStages, "+", "Future required stages: ")); builder.append(newFlagsToString(this.futureRequiredStages, previous.futureRequiredStages, "-", "")); - builder.setLength(builder.length() - 2); + if (builder.length() > 1) { + builder.setLength(builder.length() - 2); + } builder.append('}'); return builder.toString(); } diff --git a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/replacements/vectorapi/VectorAPIExpansionPhase.java b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/replacements/vectorapi/VectorAPIExpansionPhase.java index 014ff2eb8858..4f995d2eb601 100644 --- a/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/replacements/vectorapi/VectorAPIExpansionPhase.java +++ b/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/replacements/vectorapi/VectorAPIExpansionPhase.java @@ -144,6 +144,12 @@ public Optional notApplicableTo(GraphState graphState) { return NotApplicable.unlessRunBefore(this, GraphState.StageFlag.HIGH_TIER_LOWERING, graphState); } + @Override + public void updateGraphState(GraphState graphState) { + super.updateGraphState(graphState); + graphState.setAfterStage(GraphState.StageFlag.VECTOR_API_EXPANSION); + } + /** * A "connected component" of macro nodes connected by input/usage relationships or through phi * or proxy nodes.