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

            Bug ID: 129040
           Summary: Inefficient SIMD vector construction
           Product: gcc
           Version: 16.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zoltan at hidvegi dot com
  Target Milestone: ---

The function

__v8di pair2vec(long a, long b) { return __v8di{a, b}; }

generates:
        vmovq   %rdi, %xmm1
        vpinsrq $1, %rsi, %xmm1, %xmm0
        vmovdqa %xmm0, %xmm0
        vmovdqa %ymm0, %ymm0

The last 2 vmovdqa is completely unnecessary, the vmovq and vpinsrq already
clears the upper part.

Reply via email to