]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PATCH 1/2] RISC-V: Fix the outer_code when calculating the cost of SET expression.
authorXianmiao Qu <cooper.qu@linux.alibaba.com>
Wed, 18 Sep 2024 13:35:12 +0000 (07:35 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Wed, 18 Sep 2024 13:35:12 +0000 (07:35 -0600)
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.

gcc/config/riscv/riscv.cc

index fbf2da71e10dabcef5ab765c91da1feff7efabe2..7be3939a7f938238ca65665c25ff2536a431c10d 100644 (file)
@@ -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;
        }