Skip to content

Commit

Permalink
Remove unnecessary rounding mode checks and settings for RV32F
Browse files Browse the repository at this point in the history
It was observed that the instructions feqs, flts, and fles are not
affected by rounding modes in any way. Therefore, remove the
unnecessary rounding mode checks and settings associated with these
instructions. This optimization aims to avoid potential performance
impacts caused by redundant operations related to rounding modes.
  • Loading branch information
visitorckw committed Apr 8, 2024
1 parent 47d0176 commit f7ec3a2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/rv32_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,6 @@ RVOP(
RVOP(
feqs,
{
set_dynamic_rounding_mode(rv);
uint32_t ret = f32_eq(rv->F[ir->rs1], rv->F[ir->rs2]);
if (ir->rd)
rv->X[ir->rd] = ret;
Expand All @@ -1823,7 +1822,6 @@ RVOP(
RVOP(
flts,
{
set_dynamic_rounding_mode(rv);
uint32_t ret = f32_lt(rv->F[ir->rs1], rv->F[ir->rs2]);
if (ir->rd)
rv->X[ir->rd] = ret;
Expand All @@ -1836,7 +1834,6 @@ RVOP(
RVOP(
fles,
{
set_dynamic_rounding_mode(rv);
uint32_t ret = f32_le(rv->F[ir->rs1], rv->F[ir->rs2]);
if (ir->rd)
rv->X[ir->rd] = ret;
Expand Down

0 comments on commit f7ec3a2

Please sign in to comment.