diff --git a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp index f74ed8c8f81f0..1d76cb4df766c 100644 --- a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp +++ b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp @@ -131,7 +131,12 @@ void VM_Version::setup_cpu_available_features() { if (_feature_list[i]->feature_string()) { const char* tmp = _feature_list[i]->pretty(); if (strlen(tmp) == 1) { + // Feature string is expected to be in multi-character form + // like rvc, rvv, etc so that it will be easier to specify + // target feature string in tests. strcat(buf, " "); + strcat(buf, "r"); + strcat(buf, "v"); strcat(buf, tmp); } else { // Feature string is expected to be lower case. diff --git a/test/hotspot/jtreg/compiler/c2/cr7200264/TestIntVect.java b/test/hotspot/jtreg/compiler/c2/cr7200264/TestIntVect.java index 17556896f2606..457e33667b2d1 100644 --- a/test/hotspot/jtreg/compiler/c2/cr7200264/TestIntVect.java +++ b/test/hotspot/jtreg/compiler/c2/cr7200264/TestIntVect.java @@ -480,10 +480,7 @@ void test_suba(int[] a0, int[] a1, int[] a2) { @Test @IR(counts = { IRNode.SUB_VI, "> 0", IRNode.LSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.SUB_VI, "> 0", IRNode.LSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_mulc(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]*VALUE); @@ -492,10 +489,7 @@ void test_mulc(int[] a0, int[] a1) { @Test @IR(counts = { IRNode.SUB_VI, "> 0", IRNode.LSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.SUB_VI, "> 0", IRNode.LSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_mulc_n(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]*(-VALUE)); @@ -527,15 +521,7 @@ void test_mula(int[] a0, int[] a1, int[] a2) { IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", IRNode.SUB_VI, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0" }, - applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) - @IR(counts = { IRNode.ADD_VI, - IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", - IRNode.RSHIFT_VI, - IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", - IRNode.SUB_VI, - IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"avx2", "true", "sve", "true", "rvv", "true"}) // Not vectorized: On aarch64, vectorization for this example results in // MulVL nodes, which asimd does not support. @IR(counts = { IRNode.LOAD_VECTOR_I, "= 0", @@ -555,15 +541,7 @@ void test_divc(int[] a0, int[] a1) { IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", IRNode.SUB_VI, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0" }, - applyIfCPUFeatureOr = {"avx2", "true", "sve", "true"}) - @IR(counts = { IRNode.ADD_VI, - IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", - IRNode.RSHIFT_VI, - IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", - IRNode.SUB_VI, - IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"avx2", "true", "sve", "true", "rvv", "true"}) // Not vectorized: On aarch64, vectorization for this example results in // MulVL nodes, which asimd does not support. @IR(counts = { IRNode.LOAD_VECTOR_I, "= 0", @@ -683,10 +661,7 @@ void test_xora(int[] a0, int[] a1, int[] a2) { @Test @IR(counts = { IRNode.LSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.LSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_sllc(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]< 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.LSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_sllc_n(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]<<(-VALUE)); @@ -710,12 +682,7 @@ void test_sllc_n(int[] a0, int[] a1) { @IR(counts = { IRNode.LSHIFT_VI, "= 0", IRNode.LOAD_VECTOR_I, "> 0", IRNode.STORE_VECTOR, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.LSHIFT_VI, "= 0", - IRNode.LOAD_VECTOR_I, "> 0", - IRNode.STORE_VECTOR, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_sllc_o(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]< 0", IRNode.STORE_VECTOR, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.LSHIFT_VI, "= 0", - IRNode.LOAD_VECTOR_I, "> 0", - IRNode.STORE_VECTOR, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_sllc_on(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]<<(-SHIFT)); @@ -741,10 +703,7 @@ void test_sllc_on(int[] a0, int[] a1) { @Test @IR(counts = { IRNode.LSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.LSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_sllv(int[] a0, int[] a1, int b) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]< 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.URSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srlc(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>>VALUE); @@ -765,10 +721,7 @@ void test_srlc(int[] a0, int[] a1) { @Test @IR(counts = { IRNode.URSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.URSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srlc_n(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>>(-VALUE)); @@ -780,12 +733,7 @@ void test_srlc_n(int[] a0, int[] a1) { @IR(counts = { IRNode.URSHIFT_VI, "= 0", IRNode.LOAD_VECTOR_I, "> 0", IRNode.STORE_VECTOR, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.URSHIFT_VI, "= 0", - IRNode.LOAD_VECTOR_I, "> 0", - IRNode.STORE_VECTOR, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srlc_o(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>>SHIFT); @@ -797,12 +745,7 @@ void test_srlc_o(int[] a0, int[] a1) { @IR(counts = { IRNode.URSHIFT_VI, "= 0", IRNode.LOAD_VECTOR_I, "> 0", IRNode.STORE_VECTOR, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.URSHIFT_VI, "= 0", - IRNode.LOAD_VECTOR_I, "> 0", - IRNode.STORE_VECTOR, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srlc_on(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>>(-SHIFT)); @@ -811,10 +754,7 @@ void test_srlc_on(int[] a0, int[] a1) { @Test @IR(counts = { IRNode.URSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.URSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srlv(int[] a0, int[] a1, int b) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>>b); @@ -823,10 +763,7 @@ void test_srlv(int[] a0, int[] a1, int b) { @Test @IR(counts = { IRNode.RSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.RSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srac(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>VALUE); @@ -835,10 +772,7 @@ void test_srac(int[] a0, int[] a1) { @Test @IR(counts = { IRNode.RSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.RSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srac_n(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>(-VALUE)); @@ -850,12 +784,7 @@ void test_srac_n(int[] a0, int[] a1) { @IR(counts = { IRNode.RSHIFT_VI, "= 0", IRNode.LOAD_VECTOR_I, "> 0", IRNode.STORE_VECTOR, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.RSHIFT_VI, "= 0", - IRNode.LOAD_VECTOR_I, "> 0", - IRNode.STORE_VECTOR, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srac_o(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>SHIFT); @@ -867,12 +796,7 @@ void test_srac_o(int[] a0, int[] a1) { @IR(counts = { IRNode.RSHIFT_VI, "= 0", IRNode.LOAD_VECTOR_I, "> 0", IRNode.STORE_VECTOR, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.RSHIFT_VI, "= 0", - IRNode.LOAD_VECTOR_I, "> 0", - IRNode.STORE_VECTOR, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srac_on(int[] a0, int[] a1) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>(-SHIFT)); @@ -881,10 +805,7 @@ void test_srac_on(int[] a0, int[] a1) { @Test @IR(counts = { IRNode.RSHIFT_VI, "> 0" }, - applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true"}) - @IR(counts = { IRNode.RSHIFT_VI, "> 0" }, - applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}) + applyIfCPUFeatureOr = {"sse2", "true", "asimd", "true", "rvv", "true"}) void test_srav(int[] a0, int[] a1, int b) { for (int i = 0; i < a0.length; i+=1) { a0[i] = (int)(a1[i]>>b); diff --git a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java index f477a08f7174a..9896a8b906e96 100644 --- a/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java +++ b/test/hotspot/jtreg/compiler/c2/irTests/TestVectorizeURShiftSubword.java @@ -35,7 +35,7 @@ * @key randomness * @summary Auto-vectorization enhancement for unsigned shift right on signed subword types * @requires ((os.arch=="amd64" | os.arch=="x86_64") & (vm.opt.UseSSE == "null" | vm.opt.UseSSE > 3)) | os.arch=="aarch64" | - * (os.arch == "riscv64" & vm.cpu.features ~= ".*v,.*") + * (os.arch == "riscv64" & vm.cpu.features ~= ".*rvv.*") * @library /test/lib / * @run driver compiler.c2.irTests.TestVectorizeURShiftSubword */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java b/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java index 9a7e0c6b9f2b2..064ffeb41fb34 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java +++ b/test/hotspot/jtreg/compiler/intrinsics/TestBitShuffleOpers.java @@ -31,7 +31,7 @@ * (vm.cpu.features ~= ".*bmi2.*" & vm.cpu.features ~= ".*bmi1.*" & * vm.cpu.features ~= ".*sse2.*")) | * (os.arch=="aarch64" & vm.cpu.features ~= ".*svebitperm.*") | - * (os.arch=="riscv64" & vm.cpu.features ~= ".*v,.*")) + * (os.arch=="riscv64" & vm.cpu.features ~= ".*rvv.*")) * @library /test/lib / * @run driver compiler.intrinsics.TestBitShuffleOpers */ diff --git a/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java b/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java index 55f8375332d5b..448d594b6aabe 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java +++ b/test/hotspot/jtreg/compiler/intrinsics/chacha/TestChaCha20.java @@ -38,7 +38,7 @@ * @library /test/lib * @requires (vm.cpu.features ~= ".*avx512.*" | vm.cpu.features ~= ".*avx2.*" | vm.cpu.features ~= ".*avx.*") | * (os.arch=="aarch64" & vm.cpu.features ~= ".*simd.*") | - * (os.arch == "riscv64" & vm.cpu.features ~= ".*v,.*") + * (os.arch == "riscv64" & vm.cpu.features ~= ".*rvv.*") * @build compiler.intrinsics.chacha.ExerciseChaCha20 * jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox @@ -60,13 +60,9 @@ private static List mix(List o, String... mix) { return n; } - private static boolean containsFuzzy(List list, String sub, Boolean matchExactly) { + private static boolean containsFuzzy(List list, String sub) { for (String s : list) { - if (matchExactly) { - if (s.equals(sub)) return true; - } else { - if (s.contains(sub)) return true; - } + if (s.contains(sub)) return true; } return false; } @@ -86,27 +82,27 @@ public static void main(String... args) throws Exception { } // Otherwise, select the tests that make sense on current platform. - if (containsFuzzy(cpuFeatures, "avx512", false)) { + if (containsFuzzy(cpuFeatures, "avx512")) { System.out.println("Setting up AVX512 worker"); configs.add(List.of("-XX:UseAVX=3")); } - if (containsFuzzy(cpuFeatures, "avx2", false)) { + if (containsFuzzy(cpuFeatures, "avx2")) { System.out.println("Setting up AVX2 worker"); configs.add(List.of("-XX:UseAVX=2")); } - if (containsFuzzy(cpuFeatures, "avx", false)) { + if (containsFuzzy(cpuFeatures, "avx")) { System.out.println("Setting up AVX worker"); configs.add(List.of("-XX:UseAVX=1")); } } else if (Platform.isAArch64()) { // AArch64 intrinsics require the advanced simd instructions - if (containsFuzzy(cpuFeatures, "simd", false)) { + if (containsFuzzy(cpuFeatures, "simd")) { System.out.println("Setting up ASIMD worker"); configs.add(new ArrayList()); } } else if (Platform.isRISCV64()) { // Riscv64 intrinsics require the vector instructions - if (containsFuzzy(cpuFeatures, "v", true)) { + if (containsFuzzy(cpuFeatures, "rvv")) { System.out.println("Setting up vector worker"); configs.add(List.of("-XX:+UseRVV")); } diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java index fc46712bb43f1..73943db3f5374 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java @@ -108,7 +108,7 @@ public class IREncodingPrinter { "asimd", "sve", // Riscv64 - "v", + "rvv", "zvbb" )); diff --git a/test/hotspot/jtreg/compiler/vectorapi/reshape/TestVectorCastRVV.java b/test/hotspot/jtreg/compiler/vectorapi/reshape/TestVectorCastRVV.java index ebcd4a727f0e2..b8bcf73b403e5 100644 --- a/test/hotspot/jtreg/compiler/vectorapi/reshape/TestVectorCastRVV.java +++ b/test/hotspot/jtreg/compiler/vectorapi/reshape/TestVectorCastRVV.java @@ -34,7 +34,7 @@ * @modules jdk.incubator.vector * @modules java.base/jdk.internal.misc * @summary Test that vector cast intrinsics work as intended on riscv (rvv). - * @requires os.arch == "riscv64" & vm.cpu.features ~= ".*v,.*" + * @requires os.arch == "riscv64" & vm.cpu.features ~= ".*rvv.*" * @library /test/lib / * @run main/timeout=300 compiler.vectorapi.reshape.TestVectorCastRVV */ diff --git a/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java b/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java index 66943d68a678d..ee4e613dbbb7c 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java @@ -28,7 +28,7 @@ * and riscv64 (vector) * @requires vm.compiler2.enabled * @requires (os.simpleArch == "x64" & vm.cpu.features ~= ".*avx.*") | os.arch == "aarch64" | - * (os.arch == "riscv64" & vm.cpu.features ~= ".*v,.*") + * (os.arch == "riscv64" & vm.cpu.features ~= ".*rvv.*") * @library /test/lib / * @run driver compiler.vectorization.TestSignumVector */ diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java index c4f601f42c89f..ec1e3f998ca12 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/ArrayShiftOpTest.java @@ -153,10 +153,7 @@ public long[] longExplicitRotateWithPopulateIndex2() { @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VI, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VI, ">0"}) public int[] intShiftLargeDistConstant() { int[] res = new int[SIZE]; @@ -167,10 +164,7 @@ public int[] intShiftLargeDistConstant() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VI, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VI, ">0"}) public int[] intShiftLargeDistInvariant() { int[] res = new int[SIZE]; @@ -181,10 +175,7 @@ public int[] intShiftLargeDistInvariant() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VS, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VS, ">0"}) public short[] shortShiftLargeDistConstant() { short[] res = new short[SIZE]; @@ -195,10 +186,7 @@ public short[] shortShiftLargeDistConstant() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VS, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VS, ">0"}) public short[] shortShiftLargeDistInvariant() { short[] res = new short[SIZE]; @@ -209,10 +197,7 @@ public short[] shortShiftLargeDistInvariant() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.LSHIFT_VL, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.LSHIFT_VL, ">0"}) public long[] longShiftLargeDistConstant() { long[] res = new long[SIZE]; @@ -223,10 +208,7 @@ public long[] longShiftLargeDistConstant() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.URSHIFT_VL, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.URSHIFT_VL, ">0"}) public long[] longShiftLargeDistInvariant() { long[] res = new long[SIZE]; @@ -259,10 +241,7 @@ public short[] loopIndexShiftDistance() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VS, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VS, ">0"}) public short[] vectorUnsignedShiftRight() { short[] res = new short[SIZE]; diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicByteOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicByteOpTest.java index f080e29d1c358..60a6d78a7d467 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicByteOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicByteOpTest.java @@ -189,10 +189,7 @@ public byte[] vectorXor() { // ---------------- Shift ---------------- @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse4.1", "true"}, - counts = {IRNode.LSHIFT_VB, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse4.1", "true", "rvv", "true"}, counts = {IRNode.LSHIFT_VB, ">0"}) public byte[] vectorShiftLeft() { byte[] res = new byte[SIZE]; @@ -203,10 +200,7 @@ public byte[] vectorShiftLeft() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse4.1", "true"}, - counts = {IRNode.RSHIFT_VB, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse4.1", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VB, ">0"}) public byte[] vectorSignedShiftRight() { byte[] res = new byte[SIZE]; @@ -217,10 +211,7 @@ public byte[] vectorSignedShiftRight() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse4.1", "true"}, - counts = {IRNode.RSHIFT_VB, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse4.1", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VB, ">0"}) public byte[] vectorUnsignedShiftRight() { byte[] res = new byte[SIZE]; diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicCharOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicCharOpTest.java index 9fa53609ea27e..8c20b879d59d8 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicCharOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicCharOpTest.java @@ -191,10 +191,7 @@ public char[] vectorXor() { // ---------------- Shift ---------------- @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.LSHIFT_VC, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.LSHIFT_VC, ">0"}) public char[] vectorShiftLeft() { char[] res = new char[SIZE]; @@ -205,10 +202,7 @@ public char[] vectorShiftLeft() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.URSHIFT_VC, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.URSHIFT_VC, ">0"}) public char[] vectorSignedShiftRight() { char[] res = new char[SIZE]; @@ -219,10 +213,7 @@ public char[] vectorSignedShiftRight() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.URSHIFT_VC, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.URSHIFT_VC, ">0"}) public char[] vectorUnsignedShiftRight() { char[] res = new char[SIZE]; diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java index 5774e3b63b2f0..b3d7c21586776 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java @@ -198,10 +198,7 @@ public int[] vectorXor() { // ---------------- Shift ---------------- @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.LSHIFT_VI, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.LSHIFT_VI, ">0"}) public int[] vectorShiftLeft() { int[] res = new int[SIZE]; @@ -212,10 +209,7 @@ public int[] vectorShiftLeft() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VI, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VI, ">0"}) public int[] vectorSignedShiftRight() { int[] res = new int[SIZE]; @@ -226,10 +220,7 @@ public int[] vectorSignedShiftRight() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.URSHIFT_VI, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.URSHIFT_VI, ">0"}) public int[] vectorUnsignedShiftRight() { int[] res = new int[SIZE]; diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java index c6ecac096f93a..2f1bfcdf1df84 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicLongOpTest.java @@ -190,10 +190,7 @@ public long[] vectorXor() { // ---------------- Shift ---------------- @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.LSHIFT_VL, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.LSHIFT_VL, ">0"}) public long[] vectorShiftLeft() { long[] res = new long[SIZE]; @@ -204,10 +201,7 @@ public long[] vectorShiftLeft() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VL, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VL, ">0"}) public long[] vectorSignedShiftRight() { long[] res = new long[SIZE]; @@ -218,10 +212,7 @@ public long[] vectorSignedShiftRight() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.URSHIFT_VL, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.URSHIFT_VL, ">0"}) public long[] vectorUnsignedShiftRight() { long[] res = new long[SIZE]; diff --git a/test/hotspot/jtreg/compiler/vectorization/runner/BasicShortOpTest.java b/test/hotspot/jtreg/compiler/vectorization/runner/BasicShortOpTest.java index bf5516ddaf8a0..50b68cd2e4873 100644 --- a/test/hotspot/jtreg/compiler/vectorization/runner/BasicShortOpTest.java +++ b/test/hotspot/jtreg/compiler/vectorization/runner/BasicShortOpTest.java @@ -189,10 +189,7 @@ public short[] vectorXor() { // ---------------- Shift ---------------- @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.LSHIFT_VS, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.LSHIFT_VS, ">0"}) public short[] vectorShiftLeft() { short[] res = new short[SIZE]; @@ -203,10 +200,7 @@ public short[] vectorShiftLeft() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VS, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VS, ">0"}) public short[] vectorSignedShiftRight() { short[] res = new short[SIZE]; @@ -242,10 +236,7 @@ public short[] vectorMax() { } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"}, - counts = {IRNode.RSHIFT_VS, ">0"}) - @IR(applyIfPlatform = {"riscv64", "true"}, - applyIfCPUFeature = {"v", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.RSHIFT_VS, ">0"}) public short[] vectorUnsignedShiftRight() { short[] res = new short[SIZE];