https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82941
Bug ID: 82941 Summary: Missing vzeroupper with -mavx512f -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 [hjl@gnu-6 vzeroupper-skx-1]$ cat bar.c #include <immintrin.h> extern __m512d y, z; void foo () { z = y; } [hjl@gnu-6 vzeroupper-skx-1]$ make bar.s /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -march=skylake-avx512 -S bar.c [hjl@gnu-6 vzeroupper-skx-1]$ cat bar.s .file "bar.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]$