https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97707
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The prefer option is exactly that, try that first and if it fails, use the others. So I guess the main question is why it failed for the VF=4 case. E.g. for -mavx512f it wouldn't surprise me as much, because then AVX512VL is not in and it could be that AVX2 isn't able to deal with that.