https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113552
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 09749ae3817..1ddbe7a2f6b 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4071,7 +4071,7 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, || (nargs != simd_nargs)) continue; if (num_calls != 1) - this_badness += exact_log2 (num_calls) * 4096; + this_badness += floor_log2 (num_calls) * 4096 + num_calls; if (n->simdclone->inbranch) this_badness += 8192; int target_badness = targetm.simd_clone.usable (n); "fixes" it