From: Xianmiao Qu Date: Wed, 18 Sep 2024 13:35:12 +0000 (-0600) Subject: [PATCH 1/2] RISC-V: Fix the outer_code when calculating the cost of SET expression. X-Git-Tag: releases/gcc-14.3.0~240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80ab25142565e83477af7c3e57f0a4dcf51b9659;p=thirdparty%2Fgcc.git [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. --- diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 584c3d52c5e..a58c33a0aa2 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -3209,7 +3209,7 @@ riscv_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno ATTRIBUTE_UN if (outer_code == INSN && register_operand (SET_DEST (x), GET_MODE (SET_DEST (x)))) { - 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; }