https://bugs.llvm.org/show_bug.cgi?id=42538

            Bug ID: 42538
           Summary: vzeroupper elimination
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

#include <immintrin.h>

Since GCC 9+, GCC can eliminate vzeroupper in various cases, e.g.:

long long get_elem2(__m256i v) {
    return v[2];
}

Clang -O3 -march=skylake-avx512
get_elem2:
        vextracti128    xmm0, ymm0, 1
        vmovq   rax, xmm0
        vzeroupper
        ret

GCC  -O3 -march=skylake-avx512
get_elem2:
        vextracti64x2   xmm0, ymm0, 0x1
        vmovq   rax, xmm0
        ret

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to