https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115994

            Bug ID: 115994
           Summary: Vectorizer failed to do vectorizaton for .sat_trunc
                    when nunits_in / nunits_out > 2
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liuhongt at gcc dot gnu.org
  Target Milestone: ---

in vectorizable_call

 3324  nunits_in = TYPE_VECTOR_SUBPARTS (vectype_in);
 3325  nunits_out = TYPE_VECTOR_SUBPARTS (vectype_out);
 3326  if (known_eq (nunits_in * 2, nunits_out))
 3327    modifier = NARROW;
 3328  else if (known_eq (nunits_out, nunits_in))
 3329    modifier = NONE;
 3330  else if (known_eq (nunits_out * 2, nunits_in))
 3331    modifier = WIDEN;
 3332  else
 3333    return false;


x86 AVX512 supports vpmovusqb/vpmovusqw/vpmovusdb, since current vectorizer
will keep same vector length, then nunits_in / nunits_out will be greater than
2 and failed vectorization for .sat_trunc.

Reply via email to