-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 25, 27
-
Component/s: hotspot
-
master
-
riscv
ConvHF2F could be optimized by following patch.
As riscv does not have the restriction to use `iRegINoSp` in src register, it can use iRegIorL2I instead.
Check other usages of src register in riscv.ad file.
diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad
index 96984ba9a42..730dd68dd88 100644
--- a/src/hotspot/cpu/riscv/riscv.ad
+++ b/src/hotspot/cpu/riscv/riscv.ad
@@ -8542,7 +8542,7 @@ instruct convD2F_reg(fRegF dst, fRegD src) %{
// single <-> half precision
-instruct convHF2F_reg_reg(fRegF dst, iRegINoSp src, iRegINoSp tmp) %{
+instruct convHF2F_reg_reg(fRegF dst, iRegIorL2I src, iRegINoSp tmp) %{
match(Set dst (ConvHF2F src));
effect(TEMP tmp);
format %{ "fmv.h.x $dst, $src\t# move source from $src to $dst\n\t"
As riscv does not have the restriction to use `iRegINoSp` in src register, it can use iRegIorL2I instead.
Check other usages of src register in riscv.ad file.
diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad
index 96984ba9a42..730dd68dd88 100644
--- a/src/hotspot/cpu/riscv/riscv.ad
+++ b/src/hotspot/cpu/riscv/riscv.ad
@@ -8542,7 +8542,7 @@ instruct convD2F_reg(fRegF dst, fRegD src) %{
// single <-> half precision
-instruct convHF2F_reg_reg(fRegF dst, iRegINoSp src, iRegINoSp tmp) %{
+instruct convHF2F_reg_reg(fRegF dst, iRegIorL2I src, iRegINoSp tmp) %{
match(Set dst (ConvHF2F src));
effect(TEMP tmp);
format %{ "fmv.h.x $dst, $src\t# move source from $src to $dst\n\t"
- links to
-
Commit(master)
openjdk/jdk/5eb87749
-
Review(master)
openjdk/jdk25u-dev/116
-
Review(master)
openjdk/jdk/28896