20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 import org.testng.Assert;
24 import org.testng.annotations.Test;
25 import org.testng.annotations.DataProvider;
26
27 import java.nio.ByteOrder;
28 import java.util.Arrays;
29 import java.util.List;
30 import java.util.function.IntFunction;
31 import java.util.function.IntUnaryOperator;
32
33 import java.lang.foreign.MemorySegment;
34 import jdk.incubator.vector.*;
35 import jdk.internal.vm.annotation.ForceInline;
36
37 /*
38 * @test id=ZSinglegen
39 * @bug 8260473
40 * @enablePreview
41 * @requires vm.gc.ZSinglegen
42 * @modules jdk.incubator.vector
43 * @modules java.base/jdk.internal.vm.annotation
44 * @run testng/othervm -XX:CompileCommand=compileonly,jdk/incubator/vector/ByteVector.fromMemorySegment
45 * -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+UseZGC -XX:-ZGenerational -Xbatch -Xmx256m VectorRebracket128Test
46 */
47
48 /*
49 * @test id=ZGenerational
50 * @bug 8260473
51 * @enablePreview
52 * @requires vm.gc.ZGenerational
53 * @modules jdk.incubator.vector
54 * @modules java.base/jdk.internal.vm.annotation
55 * @run testng/othervm -XX:CompileCommand=compileonly,jdk/incubator/vector/ByteVector.fromMemorySegment
56 * -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+UseZGC -XX:+ZGenerational -Xbatch -Xmx256m VectorRebracket128Test
57 */
58
59 @Test
60 public class VectorRebracket128Test {
61 static final int INVOC_COUNT = Integer.getInteger("jtreg.compiler.vectorapi.vectorrebracket128test.loop-iterations", 1000);
62 static final int NUM_ITER = 200 * INVOC_COUNT;
63
64 static final VectorSpecies<Integer> ispec128 = IntVector.SPECIES_128;
65 static final VectorSpecies<Float> fspec128 = FloatVector.SPECIES_128;
66 static final VectorSpecies<Long> lspec128 = LongVector.SPECIES_128;
67 static final VectorSpecies<Double> dspec128 = DoubleVector.SPECIES_128;
68 static final VectorSpecies<Byte> bspec128 = ByteVector.SPECIES_128;
69 static final VectorSpecies<Short> sspec128 = ShortVector.SPECIES_128;
70
71 static <T> IntFunction<T> withToString(String s, IntFunction<T> f) {
|
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 import org.testng.Assert;
24 import org.testng.annotations.Test;
25 import org.testng.annotations.DataProvider;
26
27 import java.nio.ByteOrder;
28 import java.util.Arrays;
29 import java.util.List;
30 import java.util.function.IntFunction;
31 import java.util.function.IntUnaryOperator;
32
33 import java.lang.foreign.MemorySegment;
34 import jdk.incubator.vector.*;
35 import jdk.internal.vm.annotation.ForceInline;
36
37 /*
38 * @test id=ZSinglegen
39 * @bug 8260473
40 * @requires vm.gc.ZSinglegen
41 * @modules jdk.incubator.vector
42 * @modules java.base/jdk.internal.vm.annotation
43 * @run testng/othervm -XX:CompileCommand=compileonly,jdk/incubator/vector/ByteVector.fromMemorySegment
44 * -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+UseZGC -XX:-ZGenerational -Xbatch -Xmx256m VectorRebracket128Test
45 */
46
47 /*
48 * @test id=ZGenerational
49 * @bug 8260473
50 * @requires vm.gc.ZGenerational
51 * @modules jdk.incubator.vector
52 * @modules java.base/jdk.internal.vm.annotation
53 * @run testng/othervm -XX:CompileCommand=compileonly,jdk/incubator/vector/ByteVector.fromMemorySegment
54 * -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+UseZGC -XX:+ZGenerational -Xbatch -Xmx256m VectorRebracket128Test
55 */
56
57 @Test
58 public class VectorRebracket128Test {
59 static final int INVOC_COUNT = Integer.getInteger("jtreg.compiler.vectorapi.vectorrebracket128test.loop-iterations", 1000);
60 static final int NUM_ITER = 200 * INVOC_COUNT;
61
62 static final VectorSpecies<Integer> ispec128 = IntVector.SPECIES_128;
63 static final VectorSpecies<Float> fspec128 = FloatVector.SPECIES_128;
64 static final VectorSpecies<Long> lspec128 = LongVector.SPECIES_128;
65 static final VectorSpecies<Double> dspec128 = DoubleVector.SPECIES_128;
66 static final VectorSpecies<Byte> bspec128 = ByteVector.SPECIES_128;
67 static final VectorSpecies<Short> sspec128 = ShortVector.SPECIES_128;
68
69 static <T> IntFunction<T> withToString(String s, IntFunction<T> f) {
|