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 Jan 19, 2024
1 parent 8ff288f commit bbbc0ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/hotspot/cpu/riscv/riscv.ad
Expand Up @@ -1001,6 +1001,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); // idivsi
Expand Down Expand Up @@ -8674,7 +8675,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#@MoveF2I_reg_reg" %}

Expand All @@ -8692,7 +8693,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 @@ -8710,7 +8711,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 @@ -8728,7 +8729,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#@MoveL2D_reg_reg" %}

Expand Down

1 comment on commit bbbc0ea

@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.