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

            Bug ID: 95427
           Summary: Failure to avoid emitting rbp initialization when
                    doing 256-bit memory store
           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: ---

void f(int64_t *p)
{
    p[0] = 0;
    p[1] = 0;
    p[2] = 0;
    p[3] = 0;
}

With -O3 -max, LLVM produces this : 

f(long*): # @f(long*)
  vxorps xmm0, xmm0, xmm0
  vmovups ymmword ptr [rdi], ymm0
  vzeroupper
  ret

GCC produces this :

f(long*):
  push rbp
  vpxor xmm0, xmm0, xmm0
  vmovdqu XMMWORD PTR [rdi], xmm0
  vextractf128 XMMWORD PTR [rdi+16], ymm0, 0x1
  mov rbp, rsp
  vzeroupper
  pop rbp
  ret

Reply via email to