diff --git a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java index 66292e37b1c64..e6695081841c9 100644 --- a/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java +++ b/test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java @@ -55,7 +55,9 @@ 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" }, applyIfCPUFeature = {"zfh", "false"}) + @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( 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" ) );