When doing --param vect-partial-vector-usage=1 we'd continue querying the target whether it wants more vector epilogues, but when it comes back with a suggestion we then might iterate endlessly. Do not even ask the target when we decided for the last epilogue to be one with partial vectors.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. This also affects 15. * tree-vect-loop.cc (vect_analyze_loop): Stop querying further epilogues after one with partial vectors. --- gcc/tree-vect-loop.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index fd6e0f91214..9cee5195077 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -3809,6 +3809,7 @@ vect_analyze_loop (class loop *loop, gimple *loop_vectorized_call, suggests to have another one. */ masked_p = -1; if (!unlimited_cost_model (loop) + && !LOOP_VINFO_USING_PARTIAL_VECTORS_P (orig_loop_vinfo) && (orig_loop_vinfo->vector_costs->suggested_epilogue_mode (masked_p) != VOIDmode)) { -- 2.43.0