https://gcc.gnu.org/g:15a641d7804b091d37113eb07f898b0cc7da428a
commit r17-402-g15a641d7804b091d37113eb07f898b0cc7da428a Author: Richard Biener <[email protected]> Date: Wed May 6 13:47:48 2026 +0200 tree-optimization/125174 - cost OMP SIMD calls The following makes the target aware of OMP SIMD calls. Scalar costing costs calls as scalar_stmt, so make sure to at least do this level of costing for the vector side. PR tree-optimization/125174 * tree-vect-stmts.cc (vectorizable_simd_clone_call): Cost the number of OMP SIMD calls number of vector stmts. Diff: --- gcc/tree-vect-stmts.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 32691f47eb7f..3b88a6e78014 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4542,7 +4542,9 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, SLP_TREE_TYPE (slp_node) = call_simd_clone_vec_info_type; slp_node->data = new vect_simd_clone_data (std::move (_data)); DUMP_VECT_SCOPE ("vectorizable_simd_clone_call"); -/* vect_model_simple_cost (vinfo, 1, slp_node, cost_vec); */ + /* ??? We're confused by calls w/o LHS. */ + if (SLP_TREE_VECTYPE (slp_node)) + vect_model_simple_cost (vinfo, ncopies, slp_node, cost_vec); return true; }
