From cd9df312e177d99f89055500366c8111ff7e078f Mon Sep 17 00:00:00 2001 From: hamlin Date: Thu, 3 Apr 2025 16:51:03 +0000 Subject: [PATCH 1/3] initial commit --- .../compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java index 66292e37b1c64..4f922a7e774a1 100644 --- a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java +++ b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java @@ -55,7 +55,8 @@ public static void assertResults() { @Test // Match a generic SubNode, because scalar Float16 operations are often // performed as float operations. - @IR(counts = { IRNode.SUB, "2" }) + @IR(counts = { IRNode.SUB, "2" }, applyIfPlatform = {"riscv64", "false"}) + @IR(counts = { IRNode.SUB, ">= 2" }, applyIfPlatform = {"riscv64", "true"}) // Checks that the subtractions in 0 - (0 - hf) do not get eliminiated public static Float16 testHalfFloat(Float16 hf) { return Float16.subtract( From abb3d5483b1c92aff9ad6869b8fdff21feed1e10 Mon Sep 17 00:00:00 2001 From: hamlin Date: Fri, 4 Apr 2025 13:21:28 +0000 Subject: [PATCH 2/3] refine --- .../floatingpoint/TestSubNodeFloatDoubleNegation.java | 3 ++- .../jtreg/compiler/lib/ir_framework/TestFramework.java | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java index 4f922a7e774a1..5688b8a166e7c 100644 --- a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java +++ b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java @@ -56,7 +56,8 @@ public static void assertResults() { // Match a generic SubNode, because scalar Float16 operations are often // performed as float operations. @IR(counts = { IRNode.SUB, "2" }, applyIfPlatform = {"riscv64", "false"}) - @IR(counts = { IRNode.SUB, ">= 2" }, applyIfPlatform = {"riscv64", "true"}) + @IR(counts = { IRNode.SUB, "2" }, applyIfCPUFeature = {"zfh", "false"}) + @IR(counts = { IRNode.SUB, ">= 2" }, applyIfCPUFeature = {"zfh", "true"}) // Checks that the subtractions in 0 - (0 - hf) do not get eliminiated public static Float16 testHalfFloat(Float16 hf) { return Float16.subtract( diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java b/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java index 79c99352a3255..8f70ad9b7d0c0 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java @@ -139,11 +139,14 @@ public class TestFramework { "UseAVX", "UseSSE", "UseSVE", - "UseZbb", - "UseRVV", "Xlog", "LogCompilation", - "UseCompactObjectHeaders" + "UseCompactObjectHeaders", + // Riscv + "UseRVV", + "UseZbb", + "UseZfh", + "UseZvbb" ) ); From 9ed51e29df73f1d0a2267eba54d96a87ab02970c Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Mon, 7 Apr 2025 13:01:31 +0100 Subject: [PATCH 3/3] Update test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Manuel Hässig --- .../compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java index 5688b8a166e7c..e6695081841c9 100644 --- a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java +++ b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java @@ -57,7 +57,7 @@ public static void assertResults() { // performed as float operations. @IR(counts = { IRNode.SUB, "2" }, applyIfPlatform = {"riscv64", "false"}) @IR(counts = { IRNode.SUB, "2" }, applyIfCPUFeature = {"zfh", "false"}) - @IR(counts = { IRNode.SUB, ">= 2" }, applyIfCPUFeature = {"zfh", "true"}) + @IR(counts = { IRNode.SUB_HF, "2" }, applyIfCPUFeature = {"zfh", "true"}) // Checks that the subtractions in 0 - (0 - hf) do not get eliminiated public static Float16 testHalfFloat(Float16 hf) { return Float16.subtract(