[llvm] Reland "[X86] Assign AVX10_1 feature priority to align with gcc. (#94557)" (PR #94734)
Freddy Ye via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 01:34:11 PDT 2024
https://github.com/FreddyLeaf created https://github.com/llvm/llvm-project/pull/94734
This reverts commit c007883f0286a314eb69976ad14da2bce988fb55.
>From b95d83314da639450464731040fcbcc2aab457b5 Mon Sep 17 00:00:00 2001
From: Freddy Ye <freddy.ye at intel.com>
Date: Fri, 7 Jun 2024 15:13:28 +0800
Subject: [PATCH] Reland "[X86] Assign AVX10_1 feature priority to align with
gcc. (#94557)"
This reverts commit c007883f0286a314eb69976ad14da2bce988fb55.
---
llvm/include/llvm/TargetParser/X86TargetParser.def | 4 ++--
llvm/lib/TargetParser/X86TargetParser.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/include/llvm/TargetParser/X86TargetParser.def b/llvm/include/llvm/TargetParser/X86TargetParser.def
index 8daa8a689c95f..f10cede0734e4 100644
--- a/llvm/include/llvm/TargetParser/X86TargetParser.def
+++ b/llvm/include/llvm/TargetParser/X86TargetParser.def
@@ -250,8 +250,8 @@ X86_FEATURE_COMPAT(SHA512, "sha512", 0)
X86_FEATURE_COMPAT(SM4, "sm4", 0)
X86_FEATURE (EGPR, "egpr")
X86_FEATURE_COMPAT(USERMSR, "usermsr", 0)
-X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 0)
-X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 0)
+X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 36)
+X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 37)
// These features aren't really CPU features, but the frontend can set them.
X86_FEATURE (RETPOLINE_EXTERNAL_THUNK, "retpoline-external-thunk")
X86_FEATURE (RETPOLINE_INDIRECT_BRANCHES, "retpoline-indirect-branches")
diff --git a/llvm/lib/TargetParser/X86TargetParser.cpp b/llvm/lib/TargetParser/X86TargetParser.cpp
index e3802380d2bee..eda0c7f5da15a 100644
--- a/llvm/lib/TargetParser/X86TargetParser.cpp
+++ b/llvm/lib/TargetParser/X86TargetParser.cpp
@@ -748,13 +748,13 @@ unsigned llvm::X86::getFeaturePriority(ProcessorFeatures Feat) {
#ifndef NDEBUG
// Check that priorities are set properly in the .def file. We expect that
// "compat" features are assigned non-duplicate consecutive priorities
- // starting from one (1, ..., 35) and multiple zeros.
+ // starting from one (1, ..., 37) and multiple zeros.
#define X86_FEATURE_COMPAT(ENUM, STR, PRIORITY) PRIORITY,
unsigned Priorities[] = {
#include "llvm/TargetParser/X86TargetParser.def"
};
std::array<unsigned, std::size(Priorities)> HelperList;
- const size_t MaxPriority = 35;
+ const size_t MaxPriority = 37;
std::iota(HelperList.begin(), HelperList.begin() + MaxPriority + 1, 0);
for (size_t i = MaxPriority + 1; i != std::size(Priorities); ++i)
HelperList[i] = 0;
More information about the llvm-commits
mailing list