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

            Bug ID: 95905
           Summary: Failure to optimize _mm_unpacklo_epi8 with 0 as right
                    operand to _mm_cvtepu8_epi16
           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(__m128i a)
{
    return _mm_unpacklo_epi8(a, _mm_setzero_si128());
}

This can be optimized to `return _mm_cvtepu8_epi16(a);` (with -msse4`). LLVM
does this transformation, but GCC does not.

Reply via email to