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

            Bug ID: 115981
           Summary: Redundant vmovaps to itself after vmovups
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: user202729 at protonmail dot com
  Target Milestone: ---

Code: (this is in gcc/testsuite/gcc.target/i386/avx512dq-pr90991-1.c)

#include <x86intrin.h>
__m512
f4 (void *a)
{
  return _mm512_insertf32x4 (_mm512_set1_ps (0.0f), _mm_loadu_ps (a), 0);
}

Assembly:

        vmovups (%rdi), %xmm0
        vmovaps %xmm0, %xmm0
        ret

The second instruction (vmovaps %xmm0, %xmm0) looks redundant to me?

Introduced somewhere between 13.3 and 14.1.

https://godbolt.org/z/6qqdc1nK8

Reply via email to