From: Richard Biener Date: Tue, 10 Mar 2026 13:34:56 +0000 (+0100) Subject: Cost scalar into vect_body X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7eb6d800c9cc4ea79b108a22c56620587fbc0fb7;p=thirdparty%2Fgcc.git Cost scalar into vect_body 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. --- diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 1452677c461..cc40f43c252 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -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); } }