diff options
author | YunQiang Su <syq@gcc.gnu.org> | 2024-06-06 12:28:31 +0800 |
---|---|---|
committer | YunQiang Su <syq@gcc.gnu.org> | 2024-06-06 12:30:46 +0800 |
commit | edd90d6d298f006e2c2e6c710ab97cd5ad733cb5 (patch) | |
tree | f2a787765f00f6ec2bb976f553308adf9a13ed6f | |
parent | fcfce55c85f842ed843cbc4aabe744c6a004dead (diff) | |
download | gcc-edd90d6d298f006e2c2e6c710ab97cd5ad733cb5.zip gcc-edd90d6d298f006e2c2e6c710ab97cd5ad733cb5.tar.gz gcc-edd90d6d298f006e2c2e6c710ab97cd5ad733cb5.tar.bz2 |
MIPS: Need COSTS_N_INSNS in mips_insn_cost
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.
-rw-r--r-- | gcc/config/mips/mips.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index b478cdd..278d944 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; |