From: demin.han Date: Mon, 1 Apr 2024 08:20:46 +0000 (+0800) Subject: RISC-V: Minor fix for max_point X-Git-Tag: basepoints/gcc-15~313 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa2ab7b79a87c25d113752401a6026c6823dfe57;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/config/riscv/riscv-vector-costs.cc b/gcc/config/riscv/riscv-vector-costs.cc index f462c272a6e5..5ceb313c118a 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