https://gcc.gnu.org/g:39d429631ff7060238dc046db4340a304560227f
commit r16-2710-g39d429631ff7060238dc046db4340a304560227f Author: Richard Biener <rguent...@suse.de> Date: Fri Aug 1 13:27:00 2025 +0200 Properly record SLP node when costing a vectorized store Even when we emit scalar stores we should pass down the SLP node. PR tree-optimization/121350 * tree-vect-stmts.cc (vectorizable_store): Pass down SLP node when costing scalar stores in vect_body. Diff: --- gcc/tree-vect-stmts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 7f922c277996..97222f64b7eb 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -8233,7 +8233,7 @@ vectorizable_store (vec_info *vinfo, else inside_cost += record_stmt_cost (cost_vec, n_adjacent_stores, - scalar_store, stmt_info, 0, vect_body); + scalar_store, slp_node, 0, vect_body); /* Only need vector extracting when there are more than one stores. */ if (nstores > 1)