public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101456] New: Unnecessary vzeroupper when upper bits of YMM registers already zero
@ 2021-07-14 22:39 hjl.tools at gmail dot com
  2021-07-14 22:59 ` [Bug target/101456] " arjan at linux dot intel.com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2021-07-14 22:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101456
           Summary: Unnecessary vzeroupper when upper bits of YMM
                    registers already zero
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com
  Target Milestone: ---
            Target: i386, x86-64

Unnecessary vzeroupper:

[hjl@gnu-cfl-2 tmp]$ cat x.c 
#include <x86intrin.h>

extern __m256d x;

void
foo (void)
{
  x = _mm256_setzero_pd ();
}
[hjl@gnu-cfl-2 tmp]$ gcc -S -O2 x.c -mavx2 
c[hjl@gnu-cfl-2 tmp]$ cat x.s 
        .file   "x.c"
        .text
        .p2align 4
        .globl  foo
        .type   foo, @function
foo:
.LFB5667:
        .cfi_startproc
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        vxorpd  %xmm0, %xmm0, %xmm0
        vmovapd %ymm0, x(%rip)
        movq    %rsp, %rbp
        .cfi_def_cfa_register 6
        vzeroupper  <<<<<< Not needed since upper bits of YMM0 are zero.
        popq    %rbp
        .cfi_def_cfa 7, 8
        ret
        .cfi_endproc
.LFE5667:
        .size   foo, .-foo
        .ident  "GCC: (GNU) 11.1.1 20210531 (Red Hat 11.1.1-3)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 tmp]$

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-05-08 12:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 22:39 [Bug target/101456] New: Unnecessary vzeroupper when upper bits of YMM registers already zero hjl.tools at gmail dot com
2021-07-14 22:59 ` [Bug target/101456] " arjan at linux dot intel.com
2021-07-15  0:04 ` hjl.tools at gmail dot com
2021-07-15  0:06 ` hjl.tools at gmail dot com
2021-07-15 14:32 ` hjl.tools at gmail dot com
2021-07-16 12:18 ` hjl.tools at gmail dot com
2021-07-28 14:29 ` cvs-commit at gcc dot gnu.org
2021-07-28 15:02 ` hjl.tools at gmail dot com
2022-02-15 13:42 ` hjl.tools at gmail dot com
2022-02-16  4:57 ` crazylht at gmail dot com
2022-05-06  8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:22 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).