https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108410
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- So this is now fixed if you use --param vect-partial-vector-usage=2, there is at the moment no way to get masking/not masking costed against each other. In theory vect_analyze_loop_costing and vect_estimate_min_profitable_iters could do both and we could delay vect_determine_partial_vectors_and_peeling.