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

            Bug ID: 97688
           Summary: check_vect doesn't detect AVX2 on zen
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

Running on a zen2 machine (3900X) check_vect() doesn't detect AVX2 which
asks for

    /* Determine what instruction set we've been compiled for, and detect
       that we're running with it.  This allows us to at least do a compile
       check for, e.g. SSE4.1 when the machine only supports SSE2.  */
# if defined(__AVX2__)
    want_level = 7, want_b = bit_AVX2;

but __get_cpuid returns 0 for b

__maxlevel is 16

and regs after cpuid are

(gdb) info reg 
rax            0x0                 0
rbx            0x0                 0
rcx            0x0                 0
rdx            0x0                 0
rsi            0x68747541          1752462657
rdi            0x0                 0

Reply via email to