]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Cost scalar into vect_body
authorRichard Biener <rguenther@suse.de>
Tue, 10 Mar 2026 13:34:56 +0000 (14:34 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 28 Apr 2026 09:12:09 +0000 (11:12 +0200)
The following adjusts vect_compute_single_scalar_iteration_cost to
record stmts as vect_body rather than vect_prologue so that
scalar_costs->body_cost () will not be zero.

* tree-vect-loop.cc (vect_compute_single_scalar_iteration_cost):
Record stmt cost to vect_body.

gcc/tree-vect-loop.cc

index 1452677c4610113f716af3cba2f4d6bd56c1a0d1..cc40f43c2520ca2d3f340bd609665c224948558d 100644 (file)
@@ -1413,7 +1413,7 @@ vect_compute_single_scalar_iteration_cost (loop_vec_info loop_vinfo)
          /* We are using vect_prologue here to avoid scaling twice
             by the inner loop factor.  */
          record_stmt_cost (&LOOP_VINFO_SCALAR_ITERATION_COST (loop_vinfo),
-                           factor, kind, stmt_info, 0, vect_prologue);
+                           factor, kind, stmt_info, 0, vect_body);
         }
     }