https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118273
--- Comment #2 from Tamar Christina <tnfchris at gcc dot gnu.org> --- It seems that the nmasks is wrong here: unsigned nmasks = exact_div (ncopies * bestn->simdclone->simdlen, TYPE_VECTOR_SUBPARTS (vectype)).to_constant (); ncopies is correct and vectype is correct, but the value of bestn->simdclone->simdlen is suspect.