Skip to content

Commit 64f8948

Browse files
committed
[GR-68341] Fix handling of StageFlag.VECTOR_API_EXPANSION
PullRequest: graal/21726
2 parents fefd8ad + 25273be commit 64f8948

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ public String updateFromPreviousToString(GraphState previous) {
262262
builder.append(valueStringAsDiff(previous.frameStateVerification, this.frameStateVerification, "Frame state verification: ", ", "));
263263
builder.append(newFlagsToString(previous.futureRequiredStages, this.futureRequiredStages, "+", "Future required stages: "));
264264
builder.append(newFlagsToString(this.futureRequiredStages, previous.futureRequiredStages, "-", ""));
265-
builder.setLength(builder.length() - 2);
265+
if (builder.length() > 1) {
266+
builder.setLength(builder.length() - 2);
267+
}
266268
builder.append('}');
267269
return builder.toString();
268270
}

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/replacements/vectorapi/VectorAPIExpansionPhase.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ public Optional<NotApplicable> notApplicableTo(GraphState graphState) {
144144
return NotApplicable.unlessRunBefore(this, GraphState.StageFlag.HIGH_TIER_LOWERING, graphState);
145145
}
146146

147+
@Override
148+
public void updateGraphState(GraphState graphState) {
149+
super.updateGraphState(graphState);
150+
graphState.setAfterStage(GraphState.StageFlag.VECTOR_API_EXPANSION);
151+
}
152+
147153
/**
148154
* A "connected component" of macro nodes connected by input/usage relationships or through phi
149155
* or proxy nodes.

0 commit comments

Comments
 (0)