aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXianmiao Qu <cooper.qu@linux.alibaba.com>2024-09-18 07:35:12 -0600
committerJeff Law <jlaw@ventanamicro.com>2024-09-18 07:35:12 -0600
commitad5bfc2b7044ba962396de0dabcad1cd54234689 (patch)
tree6fe133f960de82ae0944df4bdb9492d5e87226ce
parentec34a4481b63bb5028b2a8c61322a7a3d362b27c (diff)
downloadgcc-ad5bfc2b7044ba962396de0dabcad1cd54234689.zip
gcc-ad5bfc2b7044ba962396de0dabcad1cd54234689.tar.gz
gcc-ad5bfc2b7044ba962396de0dabcad1cd54234689.tar.bz2
[PATCH 1/2] RISC-V: Fix the outer_code when calculating the cost of SET expression.
I think it is a typo. When calculating the 'SET_SRC (x)' cost, outer_code should be set to SET. gcc/ * config/riscv/riscv.cc (riscv_rtx_costs): Fix the outer_code when calculating the cost of SET expression.
-rw-r--r--gcc/config/riscv/riscv.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index fbf2da7..7be3939 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -3773,7 +3773,7 @@ riscv_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno ATTRIBUTE_UN
*total = COSTS_N_INSNS (1);
return true;
}
- riscv_rtx_costs (SET_SRC (x), mode, outer_code, opno, total, speed);
+ riscv_rtx_costs (SET_SRC (x), mode, SET, opno, total, speed);
return true;
}