From: Richard Biener Date: Fri, 1 Aug 2025 11:27:00 +0000 (+0200) Subject: Properly record SLP node when costing a vectorized store X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39d429631ff7060238dc046db4340a304560227f;p=thirdparty%2Fgcc.git 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 --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 7f922c27799..97222f64b7e 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)