Skip to content

Commit 5275aed

Browse files
authored
Reland "[X86] Assign AVX10_1 feature priority to align with gcc. (#94557)" (#94734)
This reverts commit c007883.
1 parent abbb24b commit 5275aed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/include/llvm/TargetParser/X86TargetParser.def

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ X86_FEATURE_COMPAT(SHA512, "sha512", 0)
250250
X86_FEATURE_COMPAT(SM4, "sm4", 0)
251251
X86_FEATURE (EGPR, "egpr")
252252
X86_FEATURE_COMPAT(USERMSR, "usermsr", 0)
253-
X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 0)
254-
X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 0)
253+
X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 36)
254+
X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 37)
255255
// These features aren't really CPU features, but the frontend can set them.
256256
X86_FEATURE (RETPOLINE_EXTERNAL_THUNK, "retpoline-external-thunk")
257257
X86_FEATURE (RETPOLINE_INDIRECT_BRANCHES, "retpoline-indirect-branches")

llvm/lib/TargetParser/X86TargetParser.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -748,13 +748,13 @@ unsigned llvm::X86::getFeaturePriority(ProcessorFeatures Feat) {
748748
#ifndef NDEBUG
749749
// Check that priorities are set properly in the .def file. We expect that
750750
// "compat" features are assigned non-duplicate consecutive priorities
751-
// starting from one (1, ..., 35) and multiple zeros.
751+
// starting from one (1, ..., 37) and multiple zeros.
752752
#define X86_FEATURE_COMPAT(ENUM, STR, PRIORITY) PRIORITY,
753753
unsigned Priorities[] = {
754754
#include "llvm/TargetParser/X86TargetParser.def"
755755
};
756756
std::array<unsigned, std::size(Priorities)> HelperList;
757-
const size_t MaxPriority = 35;
757+
const size_t MaxPriority = 37;
758758
std::iota(HelperList.begin(), HelperList.begin() + MaxPriority + 1, 0);
759759
for (size_t i = MaxPriority + 1; i != std::size(Priorities); ++i)
760760
HelperList[i] = 0;

0 commit comments

Comments
 (0)