https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106322
--- Comment #44 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Richard Biener from comment #43) > (In reply to Richard Biener from comment #42) > > I think this goes wrong in vectorizable_operation which does > > > > if (using_emulated_vectors_p > > && !vect_can_vectorize_without_simd_p (code)) > > > > to guard this but I'm not sure how this slips through? > > Ah, it's an internal function. I think we should simply return false > during analysis for any vect_emulated_vector_p type in vectorizable_call. > > Alternatively pattern recognition could also be made to fail but the above > is definitely more future proof. Thanks for the pointer! I think you meant: diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index c9534ef9b1e..ee10fa3e0fb 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -3388,6 +3388,14 @@ vectorizable_call (vec_info *vinfo, return false; } + if (vect_emulated_vector_p (vectype_in) || vect_emulated_vector_p (vectype_out)) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "use emulated vector type for call\n"); + return false; + } + /* FORNOW */ nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in); nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out); Will kick off some testings on x64/aarch64/ppc64{,le} and post it later.