On Wed, 6 May 2026, Richard Biener wrote:

> 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.
> 
> Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu.
> 
> I consider this part quite obvious, [2/2] will need some ideas.

This is the variant I pushed.

>From e5849d027bc62bbd650746d97b4e0c01eb17c003 Mon Sep 17 00:00:00 2001
From: Richard Biener <[email protected]>
Date: Wed, 6 May 2026 13:47:48 +0200
Subject: [PATCH] tree-optimization/125174 - cost OMP SIMD calls
To: [email protected]

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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 32691f47eb7..3b88a6e7801 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;
     }
 
-- 
2.51.0

Reply via email to