RISC-V: Minor fix for max_point
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Testing passed
|
rivoscibot/toolchain-ci-rivos-apply-patch |
success
|
Patch applied
|
rivoscibot/toolchain-ci-rivos-lint |
success
|
Lint passed
|
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gcv-lp64d-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gc-lp64d-multilib |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Testing passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv64gcv-lp64d-multilib |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Testing passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv32gc_zba_zbb_zbc_zbs-ilp32d-non-multilib |
success
|
Build passed
|
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc_zba_zbb_zbc_zbs-lp64d-non-multilib |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Testing passed
|
rivoscibot/toolchain-ci-rivos-test |
success
|
Testing passed
|
Commit Message
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>
---
gcc/config/riscv/riscv-vector-costs.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
It's obvious fix to previous incorrect typo.
So LGTM to trunk (GCC-14).
Thanks.
juzhe.zhong@rivai.ai
From: demin.han
Date: 2024-04-02 16:34
To: gcc-patches
CC: juzhe.zhong; kito.cheng; pan2.li; jeffreyalaw; rdapp.gcc
Subject: [PATCH] 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>
---
gcc/config/riscv/riscv-vector-costs.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/riscv/riscv-vector-costs.cc b/gcc/config/riscv/riscv-vector-costs.cc
index 484196b15b4..9f7fe936a29 100644
--- a/gcc/config/riscv/riscv-vector-costs.cc
+++ b/gcc/config/riscv/riscv-vector-costs.cc
@@ -759,7 +759,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
--
2.44.0
@@ -759,7 +759,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