Skip to content

Commit e46fd14

Browse files
committed
[GR-67604] Skip dead nodes during VectorAPIExpansion
PullRequest: graal/21498
2 parents 1684062 + b520a94 commit e46fd14

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,11 @@ private static ValueNode visitPhiForExpansion(StructuredGraph graph, NodeMap<Val
729729
*/
730730
private static void replaceComponentNodes(StructuredGraph graph, HighTierContext context, ConnectedComponent component, NodeMap<ValueNode> expanded, VectorArchitecture vectorArch) {
731731
for (ValueNode node : component.simdStamps.getKeys()) {
732+
if (!node.isAlive()) {
733+
// As we kill CFGs while replacing each element of the component, it may be the case
734+
// that an element is killed because its control dies, simply skip those elements
735+
continue;
736+
}
732737
ValueNode replacement = expanded.get(node);
733738
GraalError.guarantee(replacement != null, "node was not expanded: %s", node);
734739
graph.getDebug().dump(DebugContext.VERY_DETAILED_LEVEL, graph, "before replacing %s -> %s", node, replacement);

0 commit comments

Comments
 (0)