diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index da02082c034..9bfb898683d 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4068,7 +4068,10 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, if (!constant_multiple_p (vf * group_size, n->simdclone->simdlen, &num_calls) || (!n->simdclone->inbranch && (masked_call_offset > 0)) - || (nargs != simd_nargs)) + || (nargs != simd_nargs) + /* Currently we do not support multiple calls of non-constant + simdlen as poly vectors can not be accessed by BIT_FIELD_REF. */ + || (!n->simdclone->simdlen.is_constant () && num_calls != 1)) continue; if (num_calls != 1) this_badness += floor_log2 (num_calls) * 4096;