diff options
author | Feng Xue <fxue@os.amperecomputing.com> | 2024-06-16 12:17:26 +0800 |
---|---|---|
committer | Feng Xue <fxue@os.amperecomputing.com> | 2024-06-20 10:35:40 +0800 |
commit | 0726f1cde5459ccdbaa6af8c6904276a28d572ba (patch) | |
tree | c636ed57461afe300317754a1fd8079a5bec757d | |
parent | a944e57506fc64b8eede79c2405ba0b498461f0b (diff) | |
download | gcc-0726f1cde5459ccdbaa6af8c6904276a28d572ba.zip gcc-0726f1cde5459ccdbaa6af8c6904276a28d572ba.tar.gz gcc-0726f1cde5459ccdbaa6af8c6904276a28d572ba.tar.bz2 |
vect: Use one reduction_type local variable
Two local variables were defined to refer same STMT_VINFO_REDUC_TYPE, better
to keep only one.
2024-06-16 Feng Xue <fxue@os.amperecomputing.com>
gcc/
* tree-vect-loop.cc (vectorizable_reduction): Remove v_reduc_type, and
replace it to another local variable reduction_type.
-rw-r--r-- | gcc/tree-vect-loop.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index aab408d..27f77ed 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -7868,10 +7868,10 @@ vectorizable_reduction (loop_vec_info loop_vinfo, if (lane_reducing) STMT_VINFO_REDUC_VECTYPE_IN (stmt_info) = vectype_in; - enum vect_reduction_type v_reduc_type = STMT_VINFO_REDUC_TYPE (phi_info); - STMT_VINFO_REDUC_TYPE (reduc_info) = v_reduc_type; + enum vect_reduction_type reduction_type = STMT_VINFO_REDUC_TYPE (phi_info); + STMT_VINFO_REDUC_TYPE (reduc_info) = reduction_type; /* If we have a condition reduction, see if we can simplify it further. */ - if (v_reduc_type == COND_REDUCTION) + if (reduction_type == COND_REDUCTION) { if (slp_node && SLP_TREE_LANES (slp_node) != 1) return false; @@ -8038,7 +8038,7 @@ vectorizable_reduction (loop_vec_info loop_vinfo, STMT_VINFO_REDUC_CODE (reduc_info) = orig_code; - vect_reduction_type reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); + reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info); if (reduction_type == TREE_CODE_REDUCTION) { /* Check whether it's ok to change the order of the computation. |