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

            Bug ID: 95766
           Summary: Failure to directly use vpbroadcastd for
                    _mm_set1_epi32 when passing unsigned short
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

__m128i f(unsigned short a)
{
    return _mm_set1_epi32(a);
}

With -O3 -mavx512cd -mavx512vl, LLVM outputs this :

f(unsigned short):
  vpbroadcastd xmm0, edi
  ret

GCC outputs this :

f(unsigned short):
  kmovw k0, edi
  vpbroadcastmw2d xmm0, k0
  ret

Reply via email to