--- old/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNullableArrays.java 2019-09-20 17:24:40.000000000 +0200 +++ new/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestNullableArrays.java 2019-09-20 17:24:35.000000000 +0200 @@ -43,14 +43,7 @@ // Unlike C2, C1 intrinsics never deoptimize System.arraycopy. Instead, we fall back to // a normal method invocation when encountering flattened arrays. private static void assertDeoptimizedByC2(Method m) { - int CompLevel_none = 0, // Interpreter - CompLevel_simple = 1, // C1 - CompLevel_limited_profile = 2, // C1, invocation & backedge counters - CompLevel_full_profile = 3, // C1, invocation & backedge counters + mdo - CompLevel_full_optimization = 4; // C2 or JVMCI - - if (USE_COMPILER && !XCOMP && WHITE_BOX.isMethodCompiled(m, false) && - WHITE_BOX.getMethodCompilationLevel(m, false) >= CompLevel_full_optimization) { + if (isCompiledByC2(m)) { throw new RuntimeException("Type check should have caused it to deoptimize"); } }