]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vect: Add vect-scalar-cost-multiplier for SLP.
authorRobin Dapp <rdapp@ventanamicro.com>
Sun, 16 Nov 2025 17:43:15 +0000 (18:43 +0100)
committerRobin Dapp <rdapp@ventanamicro.com>
Mon, 24 Nov 2025 19:43:11 +0000 (20:43 +0100)
This adds the same vect-scalar-cost-multiplier to SLP costing that loop
costing already has.

gcc/ChangeLog:

* tree-vect-slp.cc (vect_bb_vectorization_profitable_p):
Multiply scalar cost by vect-scalar-cost-multiplier.

gcc/tree-vect-slp.cc

index fbaff2f7e16c8996d64e242c7ab56e94d66372d8..23098238b12494e78d1f0a7c8852f78a8494e3c9 100644 (file)
@@ -9811,7 +9811,8 @@ vect_bb_vectorization_profitable_p (bb_vec_info bb_vinfo,
       while (si < li_scalar_costs.length ()
             && li_scalar_costs[si].first == sl);
       scalar_target_cost_data->finish_cost (nullptr);
-      scalar_cost = scalar_target_cost_data->body_cost ();
+      scalar_cost = (scalar_target_cost_data->body_cost ()
+                    * param_vect_scalar_cost_multiplier) / 100;
 
       /* Complete the target-specific vector cost calculation.  */
       class vector_costs *vect_target_cost_data = init_cost (bb_vinfo, false);