https://gcc.gnu.org/g:11be9390a7f06e63179354df3fae1fd5d676abf8
commit r16-2783-g11be9390a7f06e63179354df3fae1fd5d676abf8 Author: Richard Biener <rguent...@suse.de> Date: Mon Aug 4 14:30:28 2025 +0200 Prune some unnecessary PURE_SLP_STMT checks We now never have hybrid SLP (if we have, we fail immediately). * tree-vect-data-refs.cc (vect_get_data_access_cost): Use ncopies == 1. * tree-vect-slp.cc (vect_remove_slp_scalar_calls): Remove hybrid/loop SLP skip. * tree-vect-stmts.cc (vectorizable_store): Remove pure SLP assert. Diff: --- gcc/tree-vect-data-refs.cc | 11 ++--------- gcc/tree-vect-slp.cc | 2 -- gcc/tree-vect-stmts.cc | 4 ---- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index da700cd1f3db..dc82bf688aba 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -1856,21 +1856,14 @@ vect_get_data_access_cost (vec_info *vinfo, dr_vec_info *dr_info, stmt_vector_for_cost *prologue_cost_vec) { stmt_vec_info stmt_info = dr_info->stmt; - loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo); - int ncopies; - - if (PURE_SLP_STMT (stmt_info)) - ncopies = 1; - else - ncopies = vect_get_num_copies (loop_vinfo, STMT_VINFO_VECTYPE (stmt_info)); if (DR_IS_READ (dr_info->dr)) - vect_get_load_cost (vinfo, stmt_info, NULL, ncopies, + vect_get_load_cost (vinfo, stmt_info, NULL, 1, alignment_support_scheme, misalignment, true, inside_cost, outside_cost, prologue_cost_vec, body_cost_vec, false); else - vect_get_store_cost (vinfo,stmt_info, NULL, ncopies, + vect_get_store_cost (vinfo,stmt_info, NULL, 1, alignment_support_scheme, misalignment, inside_cost, body_cost_vec); diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 3f3a509ff301..b46989505e04 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -11564,8 +11564,6 @@ vect_remove_slp_scalar_calls (vec_info *vinfo, { if (!stmt_info) continue; - if (!PURE_SLP_STMT (stmt_info)) - continue; stmt_info = vect_orig_stmt (stmt_info); gcall *stmt = dyn_cast <gcall *> (stmt_info->stmt); if (!stmt || gimple_bb (stmt) == NULL) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 97222f64b7eb..6a6f2ccbbcef 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -7780,10 +7780,6 @@ vectorizable_store (vec_info *vinfo, return false; } - /* Cannot have hybrid store SLP -- that would mean storing to the - same location twice. */ - gcc_assert (PURE_SLP_STMT (stmt_info)); - tree vectype = SLP_TREE_VECTYPE (stmt_info), rhs_vectype = NULL_TREE; poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);