From: Richard Biener Date: Tue, 10 Mar 2026 13:39:24 +0000 (+0100) Subject: Add comment to vect_estimate_min_profitable_iters X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c7dc43c8de6a42bcf581420fc75bf425faeff6e;p=thirdparty%2Fgcc.git Add comment to vect_estimate_min_profitable_iters The following adds a comment how it's awkward to add the scalar loop stmt cost vectors with scaled count to the vector loop cost vector to estimate peeling costs. * tree-vect-loop.cc (vect_estimate_min_profitable_iters): Add comment about costing of prologue/epilogue. --- diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 94f3d00d60e..ee540028ba9 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -4130,6 +4130,11 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, epilogue_need_br_taken_cost = true; } + /* The way we cummulate peeling costs into the vector prologue/epilogue + cost is a bit awkward given we cannot reuse scalar_costs which is + already computed and also because it cannot take into account any + epilogue vectorization we'll carry out in the end. */ + stmt_info_for_cost *si; int j; /* Add costs associated with peel_iters_prologue. */