diff options
author | Richard Biener <rguenther@suse.de> | 2025-08-27 15:20:03 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-09-01 14:04:24 +0200 |
commit | 3b83232c672cd969ec1f7420da99f7a054554958 (patch) | |
tree | 1bcd236b10344ebd730c7671943684d6e8ff0bee /gcc | |
parent | b3355804c7054bce288b643ce127ec5e9d0c2061 (diff) | |
download | gcc-3b83232c672cd969ec1f7420da99f7a054554958.zip gcc-3b83232c672cd969ec1f7420da99f7a054554958.tar.gz gcc-3b83232c672cd969ec1f7420da99f7a054554958.tar.bz2 |
Remove no longer needed STMT_VINFO_REDUC_DEF sets
The following removes no longer needed extra sets of STMT_VINFO_REDUC_DEF
and replaces a single remaining one with a more appropriate check.
* tree-vect-loop.cc (vectorizable_live_operation): Check
vect_is_reduction on the SLP node rather than
STMT_VINFO_REDUC_DEF on the stmt.
(vectorizable_reduction): Do not set STMT_VINFO_REDUC_DEF
on live stmts.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-vect-loop.cc | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index d3e25a5..b9fc476 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -7136,16 +7136,6 @@ vectorizable_reduction (loop_vec_info loop_vinfo, } if (!REDUC_GROUP_FIRST_ELEMENT (vdef)) only_slp_reduc_chain = false; - /* For epilogue generation live members of the chain need - to point back to the PHI via their original stmt for - info_for_reduction to work. For SLP we need to look at - all lanes here - even though we only will vectorize from - the SLP node with live lane zero the other live lanes also - need to be identified as part of a reduction to be able - to skip code generation for them. */ - for (auto s : SLP_TREE_SCALAR_STMTS (vdef_slp)) - if (STMT_VINFO_LIVE_P (s)) - STMT_VINFO_REDUC_DEF (vect_orig_stmt (s)) = phi_info; gimple_match_op op; if (!gimple_extract_op (vdef->stmt, &op)) { @@ -7194,10 +7184,6 @@ vectorizable_reduction (loop_vec_info loop_vinfo, return false; } - /* For lane-reducing operation vectorizable analysis needs the - reduction PHI information. */ - STMT_VINFO_REDUC_DEF (def) = phi_info; - /* To accommodate lane-reducing operations of mixed input vectypes, choose input vectype with the least lanes for the reduction PHI statement, which would result in the most @@ -10233,7 +10219,7 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info, /* If a stmt of a reduction is live, vectorize it via vect_create_epilog_for_reduction. vectorizable_reduction assessed validity so just trigger the transform here. */ - if (STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info))) + if (vect_is_reduction (slp_node)) { if (!vec_stmt_p) return true; |