2323
2424/*
2525 * @test
26- * @requires os.arch=="aarch64" | os.arch=="riscv64" | os.arch=="x86_64" | os.arch=="amd64"
27- * @requires vm.gc.Parallel
28- * @requires vm.compiler2.enabled
29- * @summary Check LazyConstant and lazy collection folding
26+ * @summary Check LazyConstant and lazy collection coinstant folding
3027 * @modules java.base/jdk.internal.lang
3128 * @library /test/lib /
32- * @enablePreview
33- * @run main compiler.c2.irTests.stable.LazyConstantsIrTest
29+ * @run driver ${test.main.class}
3430 */
3531
36- package compiler .c2 . irTests . stable ;
32+ package compiler .stable ;
3733
3834import compiler .lib .ir_framework .*;
3935
4440public class LazyConstantsIrTest {
4541
4642 public static void main (String [] args ) {
47- TestFramework tf = new TestFramework ();
48- tf .addTestClassesToBootClassPath ();
49- tf .addFlags (
50- "--enable-preview" ,
51- "-XX:+UnlockExperimentalVMOptions" ,
52- "-XX:CompileThreshold=100" ,
53- "-XX:-TieredCompilation" ,
54- "-XX:+UseParallelGC"
55- );
56- tf .start ();
43+ new TestFramework ()
44+ .addTestClassesToBootClassPath ()
45+ .addFlags (
46+ "--enable-preview" ,
47+ "-XX:+UnlockExperimentalVMOptions" )
48+ . addCrossProductScenarios (
49+ Set . of ( "-XX:+UseEpsilonGC" , "-XX:+UseSerialGC" , "-XX:+UseParallelGC" , "-XX:+UseG1GC" , "-XX:+UseZGC" ) ,
50+ Set . of ( "-XX:+TieredCompilation" , "-XX:-TieredCompilation" ))
51+ . setDefaultWarmup ( 5000 )
52+ .start ();
5753 }
5854
5955 static final int THE_VALUE = 42 ;
@@ -95,4 +91,4 @@ static int foldLazyMap() {
9591 return LAZY_MAP .get (0 );
9692 }
9793
98- }
94+ }
0 commit comments