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

            Bug ID: 104915
           Summary: Miss optimization for vec_setv8hi_0
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

#include<immintrin.h>
__m128i
foo (short* p)
{
    return _mm_set_epi32 (0, 0, 0, (unsigned short) ((*(__m16_u *)p)[0]));
}

__m128i
foo1 (short* p)
{
    return _mm_set_epi16 (0, 0, 0, 0, 0, 0, 0, (*(__m16_u *)p)[0]);
}

under avx512fp16, foo could generate vmovw instead of movzx + vmovd, without
avx512fp16 foo1 could generate movzx + movd instead of pxor + pinsrw.

Reply via email to