11/*
22 * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3+ * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
34 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
45 *
56 * This code is free software; you can redistribute it and/or modify it
2526 * @test
2627 * @bug 8263707
2728 * @summary Test range check for constant array and NewMultiArray is removed properly
29+ * @author Hui Shi
30+ *
2831 * @requires vm.debug == true & vm.compiler1.enabled
2932 *
3033 * @library /test/lib
31- * @run main/othervm compiler.c1.TestRangeCheckEliminated
3234 *
33- * @author Hui Shi
34- */
35+ * @run driver compiler.c1.TestRangeCheckEliminated
36+ */
3537
3638package compiler .c1 ;
3739
38- import jdk .test .lib .Asserts ;
3940import jdk .test .lib .process .OutputAnalyzer ;
4041import jdk .test .lib .process .ProcessTools ;
4142
@@ -48,8 +49,8 @@ public static void main(String[] args) throws Throwable {
4849 "-XX:TieredStopAtLevel=1" ,
4950 "-XX:+TraceRangeCheckElimination" ,
5051 "-XX:-BackgroundCompilation" ,
51- "compiler.c1.TestRangeCheckEliminated$test_constant_array"
52- };
52+ test_constant_array . class . getName ()
53+ };
5354
5455 ProcessBuilder pb = ProcessTools .createJavaProcessBuilder (procArgs );
5556 String output = new OutputAnalyzer (pb .start ()).getOutput ();
@@ -67,8 +68,8 @@ public static void main(String[] args) throws Throwable {
6768 "-XX:TieredStopAtLevel=1" ,
6869 "-XX:+TraceRangeCheckElimination" ,
6970 "-XX:-BackgroundCompilation" ,
70- "compiler.c1.TestRangeCheckEliminated$test_multi_constant_array"
71- };
71+ test_multi_constant_array . class . getName ()
72+ };
7273
7374 pb = ProcessTools .createJavaProcessBuilder (procArgs );
7475 output = new OutputAnalyzer (pb .start ()).getOutput ();
@@ -86,8 +87,8 @@ public static void main(String[] args) throws Throwable {
8687 "-XX:TieredStopAtLevel=1" ,
8788 "-XX:+TraceRangeCheckElimination" ,
8889 "-XX:-BackgroundCompilation" ,
89- "compiler.c1.TestRangeCheckEliminated$test_multi_new_array"
90- };
90+ test_multi_new_array . class . getName ()
91+ };
9192
9293 pb = ProcessTools .createJavaProcessBuilder (procArgs );
9394 output = new OutputAnalyzer (pb .start ()).getOutput ();
0 commit comments