aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/riscv/riscv-vector-costs.cc
diff options
context:
space:
mode:
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>2024-01-02 09:52:04 +0800
committerPan Li <pan2.li@intel.com>2024-01-02 10:10:27 +0800
commitd2e40f2867da1d2c6a42122c057ee980e74a5440 (patch)
tree3804a4b959d4d16a6c72b1a58cc1b903ca072d1c /gcc/config/riscv/riscv-vector-costs.cc
parent3c20e6263abc361b5eec8a515388959ed4434776 (diff)
downloadgcc-d2e40f2867da1d2c6a42122c057ee980e74a5440.zip
gcc-d2e40f2867da1d2c6a42122c057ee980e74a5440.tar.gz
gcc-d2e40f2867da1d2c6a42122c057ee980e74a5440.tar.bz2
RISC-V: Declare STMT_VINFO_TYPE (...) as local variable
Committed. gcc/ChangeLog: * config/riscv/riscv-vector-costs.cc: Move STMT_VINFO_TYPE (...) to local.
Diffstat (limited to 'gcc/config/riscv/riscv-vector-costs.cc')
-rw-r--r--gcc/config/riscv/riscv-vector-costs.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/config/riscv/riscv-vector-costs.cc b/gcc/config/riscv/riscv-vector-costs.cc
index b41a794..1199b3a 100644
--- a/gcc/config/riscv/riscv-vector-costs.cc
+++ b/gcc/config/riscv/riscv-vector-costs.cc
@@ -279,10 +279,11 @@ compute_local_live_ranges (
gimple *stmt = program_point.stmt;
stmt_vec_info stmt_info = program_point.stmt_info;
tree lhs = gimple_get_lhs (stmt);
+ enum stmt_vec_info_type type
+ = STMT_VINFO_TYPE (vect_stmt_to_vectorize (stmt_info));
if (lhs != NULL_TREE && is_gimple_reg (lhs)
&& (!POINTER_TYPE_P (TREE_TYPE (lhs))
- || STMT_VINFO_TYPE (vect_stmt_to_vectorize (stmt_info))
- != store_vec_info_type))
+ || type != store_vec_info_type))
{
biggest_mode = get_biggest_mode (biggest_mode,
TYPE_MODE (TREE_TYPE (lhs)));
@@ -309,9 +310,7 @@ compute_local_live_ranges (
if (poly_int_tree_p (var)
|| (is_gimple_val (var)
&& (!POINTER_TYPE_P (TREE_TYPE (var))
- || STMT_VINFO_TYPE (
- vect_stmt_to_vectorize (stmt_info))
- != load_vec_info_type)))
+ || type != load_vec_info_type)))
{
biggest_mode
= get_biggest_mode (biggest_mode,