From: YunQiang Su <s...@gcc.gnu.org> In mips_insn_cost, COSTS_N_INSNS is missing when we return the cost if count * ratio > 0.
gcc * config/mips/mips.cc(mips_insn_cost): Add missing COSTS_N_INSNS to count. --- gcc/config/mips/mips.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index b478cddc8ad..278d9446482 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -4199,7 +4199,7 @@ mips_insn_cost (rtx_insn *x, bool speed) count = get_attr_insn_count (x); ratio = get_attr_perf_ratio (x); - cost = count * ratio; + cost = COSTS_N_INSNS (count) * ratio; if (cost > 0) return cost; -- 2.39.3 (Apple Git-146)