Skip to content

Commit

Permalink
8322790: RISC-V: Tune costs for shuffles with no conversion
Browse files Browse the repository at this point in the history
Backport-of: 2acb5bd9924511b58b0e57ea9eb6c2dee9fd3ee8
  • Loading branch information
Ilya Gavrilin authored and Vladimir Kempik committed Feb 20, 2024
1 parent a9792a8 commit 4fcc5c7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/hotspot/cpu/riscv/riscv.ad
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ definitions %{
int_def LOAD_COST ( 300, 3 * DEFAULT_COST); // load, fpload
int_def STORE_COST ( 100, 1 * DEFAULT_COST); // store, fpstore
int_def XFER_COST ( 300, 3 * DEFAULT_COST); // mfc, mtc, fcvt, fmove, fcmp
int_def FMVX_COST ( 100, 1 * DEFAULT_COST); // shuffles with no conversion
int_def BRANCH_COST ( 200, 2 * DEFAULT_COST); // branch, jmp, call
int_def IMUL_COST ( 1000, 10 * DEFAULT_COST); // imul
int_def IDIVSI_COST ( 3400, 34 * DEFAULT_COST); // idivdi
Expand Down Expand Up @@ -8483,7 +8484,7 @@ instruct MoveF2I_reg_reg(iRegINoSp dst, fRegF src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.x.w $dst, $src\t#@MoveL2D_reg_stack" %}

Expand All @@ -8501,7 +8502,7 @@ instruct MoveI2F_reg_reg(fRegF dst, iRegI src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.w.x $dst, $src\t#@MoveI2F_reg_reg" %}

Expand All @@ -8519,7 +8520,7 @@ instruct MoveD2L_reg_reg(iRegLNoSp dst, fRegD src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.x.d $dst, $src\t#@MoveD2L_reg_reg" %}

Expand All @@ -8537,7 +8538,7 @@ instruct MoveL2D_reg_reg(fRegD dst, iRegL src) %{

effect(DEF dst, USE src);

ins_cost(XFER_COST);
ins_cost(FMVX_COST);

format %{ "fmv.d.x $dst, $src\t#@MoveD2L_reg_reg" %}

Expand Down

1 comment on commit 4fcc5c7

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.