]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/125174 - cost OMP SIMD calls
authorRichard Biener <rguenther@suse.de>
Wed, 6 May 2026 11:47:48 +0000 (13:47 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 8 May 2026 08:00:57 +0000 (10:00 +0200)
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.

gcc/tree-vect-stmts.cc

index 32691f47eb7f3e006aee1d05300a09065924d0b6..3b88a6e78014c573aff8d187ef877a953cefcacb 100644 (file)
@@ -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;
     }