]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Properly record SLP node when costing a vectorized store
authorRichard Biener <rguenther@suse.de>
Fri, 1 Aug 2025 11:27:00 +0000 (13:27 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 1 Aug 2025 12:54:11 +0000 (14:54 +0200)
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.

gcc/tree-vect-stmts.cc

index 7f922c277996dcefdd5e600119a24abd99f80847..97222f64b7eb792fdef47a3c9e45ad70d10ffefb 100644 (file)
@@ -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)