src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchDyingLoopTest.java
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchDyingLoopTest.java Tue Sep 24 08:54:08 2019 -0700
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchDyingLoopTest.java Tue Sep 24 12:47:15 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -75,11 +75,11 @@
StructuredGraph graph = parseEager("snippet", StructuredGraph.AllowAssumptions.YES);
// there should be 1 loop and 1 switch
assertThat(graph.getNodes(LoopBeginNode.TYPE), hasCount(1));
- assertThat(graph.getNodes(IntegerSwitchNode.TYPE), hasCount(1));
+ assertThat(graph.getNodes().filter(IntegerSwitchNode.class), hasCount(1));
canonicalizerPhase.apply(graph, highTierContext);
// after canonicalization, the loop and switch should still be there
assertThat(graph.getNodes(LoopBeginNode.TYPE), hasCount(1));
- assertThat(graph.getNodes(IntegerSwitchNode.TYPE), hasCount(1));
+ assertThat(graph.getNodes().filter(IntegerSwitchNode.class), hasCount(1));
// add stamp to `a` so that paths leading to continue can be trimmed
ParameterNode parameter = graph.getParameter(0);
assertNotNull(parameter);
@@ -87,6 +87,6 @@
canonicalizerPhase.apply(graph, highTierContext);
// the loop should have disappeared and there should still be a switch
assertThat(graph.getNodes(LoopBeginNode.TYPE), isEmpty());
- assertThat(graph.getNodes(IntegerSwitchNode.TYPE), hasCount(1));
+ assertThat(graph.getNodes().filter(IntegerSwitchNode.class), hasCount(1));
}
}