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

            Bug ID: 46408
           Summary: Prefer zmm16 through zmm31 to avoid vzeroupper
           Product: libraries
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: josephcsi...@gmail.com
                CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
                    llvm-...@redking.me.uk, spatel+l...@rotateright.com

Consider this code:

#include <immintrin.h>
void f(void) {
    __m512 tmp;
    __asm__ __volatile__("nop # it picked %0" : "=v"(tmp));
}

Or this minimized code, without headers:

void f(void) {
    float __attribute__((__vector_size__(64))) tmp;
    __asm__ __volatile__("nop # it picked %0" : "=v"(tmp));
}

Compile with "-mavx512f". In both cases, it will end up picking zmm0, and thus
needing to emit vzeroupper afterwards. Since we're using AVX512 anyway, we
should prefer zmm16 through zmm31, which don't require vzeroupper afterwards.

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

Reply via email to