This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/82942] New: Generate vzeroupper with -mavx512f -mno-avx512er -O2


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

            Bug ID: 82942
           Summary: Generate vzeroupper with -mavx512f -mno-avx512er -O2
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: pavel.v.chupin at gmail dot com, ubizjak at gmail dot com
  Target Milestone: ---
            Target: x86

When AVX512F is enabled, the vzerouppoer optimization is disabled.
This is intended only for Xeon Phi, not for Skylake server which
also has AVX512F.  Since AVX512ER is unique to Xeon Phi and will
never appear in non Xeon Phi processors, the vzerouppoer optimization
should be enabled when AVX512F is enabled, but AVX512ER isn't:



[hjl@gnu-6 vzeroupper-skx-1]$ cat foo.c
#include <immintrin.h>

extern __m512d y, z;

void
foo ()
{
  z = y;
}
[hjl@gnu-6 vzeroupper-skx-1]$ make foo.s
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -mavx512f -mno-avx512er -O2  
-S foo.c
c[hjl@gnu-6 vzeroupper-skx-1]$ cat foo.s
        .file   "foo.c"
        .text
        .p2align 4,,15
        .globl  foo
        .type   foo, @function
foo:
.LFB4897:
        .cfi_startproc
        vmovapd y(%rip), %zmm0
        vmovapd %zmm0, z(%rip)
        ret
        .cfi_endproc
.LFE4897:
        .size   foo, .-foo
        .ident  "GCC: (GNU) 8.0.0 20171110 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-6 vzeroupper-skx-1]$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]