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

            Bug ID: 113149
           Summary: Function multiversioning prefers arch=x86-64-v3 to
                    actual processors
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ed at catmur dot uk
  Target Milestone: ---

Since #101696, we can write

__attribute__ ((target ("arch=x86-64-v3")))
char const* f() { return "x86-64-v3"; }

But x86-64-v3 is preferred to any of the processors that support this feature
set, which seems backwards - even Haswell supports pclmul and rdrnd, which
aren't in x86-64-v3.

It feels that it should be OK to swap the ordering of P_PROC_AVX2 with
P_X86_64_V3, and P_PROC_AVX512F with P_X86_64_V4, in enum feature_priority.

Reply via email to