diff options
author | demin.han <demin.han@starfivetech.com> | 2024-04-01 16:20:46 +0800 |
---|---|---|
committer | demin.han <demin.han@starfivetech.com> | 2024-04-08 14:13:42 +0800 |
commit | aa2ab7b79a87c25d113752401a6026c6823dfe57 (patch) | |
tree | a4804413b4c85b253e2f34e0de879b7ce0d9c443 | |
parent | af3a9807435a114c62f44f9d55456a3d37e0c25b (diff) | |
download | gcc-aa2ab7b79a87c25d113752401a6026c6823dfe57.zip gcc-aa2ab7b79a87c25d113752401a6026c6823dfe57.tar.gz gcc-aa2ab7b79a87c25d113752401a6026c6823dfe57.tar.bz2 |
RISC-V: Minor fix for max_point
The program points start from 1, so max_point should be equal to
length().
Tested on RV64 and no regression.
gcc/ChangeLog:
* config/riscv/riscv-vector-costs.cc: Use length()
Signed-off-by: demin.han <demin.han@starfivetech.com>
-rw-r--r-- | gcc/config/riscv/riscv-vector-costs.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/riscv/riscv-vector-costs.cc b/gcc/config/riscv/riscv-vector-costs.cc index f462c27..5ceb313 100644 --- a/gcc/config/riscv/riscv-vector-costs.cc +++ b/gcc/config/riscv/riscv-vector-costs.cc @@ -752,7 +752,7 @@ update_local_live_ranges ( We will be likely using one more vector variable. */ unsigned int max_point - = (*program_points_per_bb.get (bb)).length () - 1; + = (*program_points_per_bb.get (bb)).length (); auto *live_ranges = live_ranges_per_bb.get (bb); bool existed_p = false; tree var = type == load_vec_info_type |