[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
https://github.com/RKSimon requested changes to this pull request. Fix merge failures https://github.com/llvm/llvm-project/pull/171172 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
mikolaj-pirog wrote: > @mikolaj-pirog are you still working on this? Yes -- I aim to get back to this before end of the month. I need to rebase and add some basic test (most likely test that values emitted by clang make sense) https://github.com/llvm/llvm-project/pull/171172 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
RKSimon wrote: @mikolaj-pirog are you still working on this? https://github.com/llvm/llvm-project/pull/171172 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
phoebewang wrote: I'm always nervous seeing large changes without testing. Since the target is to match with libgcc, is it possible to verify it with GCC tests. I know llvm-test-suite contains some GCC tests. So it would be good to add them there. And a local verification is still better than none, if adding GCC tests is impossible. https://github.com/llvm/llvm-project/pull/171172 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
https://github.com/mikolaj-pirog updated
https://github.com/llvm/llvm-project/pull/171172
From 1b4e46d3697aaa0d0d88117586393536eb406e57 Mon Sep 17 00:00:00 2001
From: "Pirog, Mikolaj Maciej"
Date: Thu, 4 Dec 2025 15:07:20 +0100
Subject: [PATCH 1/4] Sync multiversion features with libgcc and refactor
internal cpu type tables
---
clang/lib/Basic/Targets/X86.cpp | 6 +-
clang/lib/CodeGen/TargetBuiltins/X86.cpp | 6 +-
compiler-rt/lib/builtins/cpu_model/x86.c | 9 +-
.../llvm/TargetParser/X86TargetParser.def | 126 +-
.../llvm/TargetParser/X86TargetParser.h | 14 +-
5 files changed, 82 insertions(+), 79 deletions(-)
diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index f00d435937b92..d5af21c155c8a 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -1363,11 +1363,11 @@ void X86TargetInfo::getCPUSpecificCPUDispatchFeatures(
// rather than the full range of cpus.
bool X86TargetInfo::validateCpuIs(StringRef FeatureStr) const {
return llvm::StringSwitch(FeatureStr)
-#define X86_VENDOR(ENUM, STRING) .Case(STRING, true)
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE) .Case(STRING, true)
#define X86_CPU_TYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, true)
-#define X86_CPU_TYPE(ENUM, STR) .Case(STR, true)
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE) .Case(STR, true)
#define X86_CPU_SUBTYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, true)
-#define X86_CPU_SUBTYPE(ENUM, STR) .Case(STR, true)
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE) .Case(STR, true)
#include "llvm/TargetParser/X86TargetParser.def"
.Default(false);
}
diff --git a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
index be2b7d442645e..f57544def1fe5 100644
--- a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
@@ -630,15 +630,15 @@ Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
// Calculate the index needed to access the correct field based on the
// range. Also adjust the expected value.
auto [Index, Value] = StringSwitch>(CPUStr)
-#define X86_VENDOR(ENUM, STRING)
\
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE)
\
.Case(STRING, {0u, static_cast(llvm::X86::ENUM)})
#define X86_CPU_TYPE_ALIAS(ENUM, ALIAS)
\
.Case(ALIAS, {1u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_TYPE(ENUM, STR)
\
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE)
\
.Case(STR, {1u, static_cast(llvm::X86::ENUM)})
#define X86_CPU_SUBTYPE_ALIAS(ENUM, ALIAS)
\
.Case(ALIAS, {2u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_SUBTYPE(ENUM, STR)
\
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE)
\
.Case(STR, {2u, static_cast(llvm::X86::ENUM)})
#include "llvm/TargetParser/X86TargetParser.def"
.Default({0, 0});
diff --git a/compiler-rt/lib/builtins/cpu_model/x86.c
b/compiler-rt/lib/builtins/cpu_model/x86.c
index 8b352cfe568d0..f52561a36622b 100644
--- a/compiler-rt/lib/builtins/cpu_model/x86.c
+++ b/compiler-rt/lib/builtins/cpu_model/x86.c
@@ -41,7 +41,8 @@ enum VendorSignatures {
enum ProcessorVendors {
VENDOR_INTEL = 1,
VENDOR_AMD,
- VENDOR_OTHER,
+ // VENDOR_ZHAOXIN
+ VENDOR_OTHER = 4,
VENDOR_MAX
};
@@ -104,8 +105,10 @@ enum ProcessorSubtypes {
INTEL_COREI7_ARROWLAKE,
INTEL_COREI7_ARROWLAKE_S,
INTEL_COREI7_PANTHERLAKE,
- AMDFAM1AH_ZNVER5,
- INTEL_COREI7_DIAMONDRAPIDS,
+ // ZHAOXIN_FAM7H_YONGFENG
+ AMDFAM1AH_ZNVER5 = 36,
+ // ZHAOXIN_FAM7H_SHIJIDADAO
+ INTEL_COREI7_DIAMONDRAPIDS = 38,
INTEL_COREI7_NOVALAKE,
CPU_SUBTYPE_MAX
};
diff --git a/llvm/include/llvm/TargetParser/X86TargetParser.def
b/llvm/include/llvm/TargetParser/X86TargetParser.def
index 09592bcea27f4..8d401e62a6271 100644
--- a/llvm/include/llvm/TargetParser/X86TargetParser.def
+++ b/llvm/include/llvm/TargetParser/X86TargetParser.def
@@ -13,15 +13,17 @@
// NOTE: NO INCLUDE GUARD DESIRED!
#ifndef X86_VENDOR
-#define X86_VENDOR(ENUM, STR)
+#define X86_VENDOR(ENUM, STR, ABI_VALUE)
#endif
-X86_VENDOR(VENDOR_INTEL, "intel")
-X86_VENDOR(VENDOR_AMD, "amd")
+X86_VENDOR(VENDOR_INTEL, "intel", 1)
+X86_VENDOR(VENDOR_AMD, "amd", 2)
+X86_VENDOR(VENDOR_OTHER, "other", 4)
#undef X86_VENDOR
// This macro is used for cpu types present in compiler-rt/libgcc.
+// ABI_VALUE is used to match
#ifndef X86_CPU_TYPE
-#define X86_CPU_TYPE(ENUM, STR)
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE)
#endif
#ifndef X86_CPU_TYPE_ALIAS
@@ -30,26 +32,26 @@ X86_VENDOR(VENDOR_AMD, "amd")
// This list must match what is implemented in libgcc and compilert-rt. Clang
// uses this to know how to implement __builtin_cpu_is.
-X86_CPU_TYPE
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff origin/main HEAD --extensions c,cpp,h --
clang/lib/Basic/Targets/X86.cpp clang/lib/CodeGen/TargetBuiltins/X86.cpp
compiler-rt/lib/builtins/cpu_model/x86.c
llvm/include/llvm/TargetParser/X86TargetParser.h
llvm/lib/TargetParser/X86TargetParser.cpp --diff_from_common_commit
``
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
View the diff from clang-format here.
``diff
diff --git a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
index df63c1ce7..f243856e3 100644
--- a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
@@ -630,12 +630,9 @@ Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
// Calculate the index needed to access the correct field based on the
// range. ABI_VALUE matches with compiler-rt/libgcc values.
auto [Index, Value] = StringSwitch>(CPUStr)
-#define X86_VENDOR(ENUM, STRING, ABI_VALUE)
\
- .Case(STRING, {0u, ABI_VALUE})
-#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE)
\
- .Case(STR, {1u, ABI_VALUE})
-#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE)
\
- .Case(STR, {2u, ABI_VALUE})
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE) .Case(STRING, {0u, ABI_VALUE})
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE) .Case(STR, {1u, ABI_VALUE})
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE) .Case(STR, {2u, ABI_VALUE})
#include "llvm/TargetParser/X86TargetParser.def"
.Default({0, 0});
assert(Value != 0 && "Invalid CPUStr passed to CpuIs");
diff --git a/llvm/lib/TargetParser/X86TargetParser.cpp
b/llvm/lib/TargetParser/X86TargetParser.cpp
index c3365da6b..dddf1fe86 100644
--- a/llvm/lib/TargetParser/X86TargetParser.cpp
+++ b/llvm/lib/TargetParser/X86TargetParser.cpp
@@ -762,9 +762,10 @@ llvm::X86::getCpuSupportsMask(ArrayRef
FeatureStrs) {
std::array FeatureMask{};
for (StringRef FeatureStr : FeatureStrs) {
unsigned Feature = StringSwitch(FeatureStr)
- // ABI_VALUE is used to match values in compiler-rt/libgcc
+// ABI_VALUE is used to match values in compiler-rt/libgcc
#define X86_FEATURE_COMPAT(ENUM, STR, PRIORITY, ABI_VALUE) .Case(STR,
ABI_VALUE)
-#define X86_MICROARCH_LEVEL(ENUM, STR, PRIORITY, ABI_VALUE) .Case(STR,
ABI_VALUE)
+#define X86_MICROARCH_LEVEL(ENUM, STR, PRIORITY, ABI_VALUE)
\
+ .Case(STR, ABI_VALUE)
#include "llvm/TargetParser/X86TargetParser.def"
;
assert(Feature / 32 < FeatureMask.size());
``
https://github.com/llvm/llvm-project/pull/171172
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
Author: Mikołaj Piróg (mikolaj-pirog)
Changes
This is a continuation of previous PR:
https://github.com/llvm/llvm-project/pull/168750
compiler-rt was synced with libgcc on ProcessorVendor and ProcessorSubtype
fields and so was llvm. Cpu type, subtype and vendor entries in
X86TargetParser.def were refactored to use ABI_VALUE.
LLVM doesn't set the ABI_VALUE for its enums -- clang now takes care of that by
reading the ABI_VALUE.
I've removed and added some comments to better explain what is going on.
---
Full diff: https://github.com/llvm/llvm-project/pull/171172.diff
6 Files Affected:
- (modified) clang/lib/Basic/Targets/X86.cpp (+3-5)
- (modified) clang/lib/CodeGen/TargetBuiltins/X86.cpp (+7-11)
- (modified) compiler-rt/lib/builtins/cpu_model/x86.c (+6-3)
- (modified) llvm/include/llvm/TargetParser/X86TargetParser.def (+81-90)
- (modified) llvm/include/llvm/TargetParser/X86TargetParser.h (+4-18)
- (modified) llvm/lib/TargetParser/X86TargetParser.cpp (+2-2)
``diff
diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index f00d435937b92..0c72229623eb1 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -1363,11 +1363,9 @@ void X86TargetInfo::getCPUSpecificCPUDispatchFeatures(
// rather than the full range of cpus.
bool X86TargetInfo::validateCpuIs(StringRef FeatureStr) const {
return llvm::StringSwitch(FeatureStr)
-#define X86_VENDOR(ENUM, STRING) .Case(STRING, true)
-#define X86_CPU_TYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, true)
-#define X86_CPU_TYPE(ENUM, STR) .Case(STR, true)
-#define X86_CPU_SUBTYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, true)
-#define X86_CPU_SUBTYPE(ENUM, STR) .Case(STR, true)
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE) .Case(STRING, true)
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE) .Case(STR, true)
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE) .Case(STR, true)
#include "llvm/TargetParser/X86TargetParser.def"
.Default(false);
}
diff --git a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
index be2b7d442645e..df63c1ce7b613 100644
--- a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
@@ -628,18 +628,14 @@ Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
cast(CpuModel)->setDSOLocal(true);
// Calculate the index needed to access the correct field based on the
- // range. Also adjust the expected value.
+ // range. ABI_VALUE matches with compiler-rt/libgcc values.
auto [Index, Value] = StringSwitch>(CPUStr)
-#define X86_VENDOR(ENUM, STRING)
\
- .Case(STRING, {0u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_TYPE_ALIAS(ENUM, ALIAS)
\
- .Case(ALIAS, {1u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_TYPE(ENUM, STR)
\
- .Case(STR, {1u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_SUBTYPE_ALIAS(ENUM, ALIAS)
\
- .Case(ALIAS, {2u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_SUBTYPE(ENUM, STR)
\
- .Case(STR, {2u, static_cast(llvm::X86::ENUM)})
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE)
\
+ .Case(STRING, {0u, ABI_VALUE})
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE)
\
+ .Case(STR, {1u, ABI_VALUE})
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE)
\
+ .Case(STR, {2u, ABI_VALUE})
#include "llvm/TargetParser/X86TargetParser.def"
.Default({0, 0});
assert(Value != 0 && "Invalid CPUStr passed to CpuIs");
diff --git a/compiler-rt/lib/builtins/cpu_model/x86.c
b/compiler-rt/lib/builtins/cpu_model/x86.c
index 8b352cfe568d0..f52561a36622b 100644
--- a/compiler-rt/lib/builtins/cpu_model/x86.c
+++ b/compiler-rt/lib/builtins/cpu_model/x86.c
@@ -41,7 +41,8 @@ enum VendorSignatures {
enum ProcessorVendors {
VENDOR_INTEL = 1,
VENDOR_AMD,
- VENDOR_OTHER,
+ // VENDOR_ZHAOXIN
+ VENDOR_OTHER = 4,
VENDOR_MAX
};
@@ -104,8 +105,10 @@ enum ProcessorSubtypes {
INTEL_COREI7_ARROWLAKE,
INTEL_COREI7_ARROWLAKE_S,
INTEL_COREI7_PANTHERLAKE,
- AMDFAM1AH_ZNVER5,
- INTEL_COREI7_DIAMONDRAPIDS,
+ // ZHAOXIN_FAM7H_YONGFENG
+ AMDFAM1AH_ZNVER5 = 36,
+ // ZHAOXIN_FAM7H_SHIJIDADAO
+ INTEL_COREI7_DIAMONDRAPIDS = 38,
INTEL_COREI7_NOVALAKE,
CPU_SUBTYPE_MAX
};
diff --git a/llvm/include/llvm/TargetParser/X86TargetParser.def
b/llvm/include/llvm/TargetParser/X86TargetParser.def
index 09592bcea27f4..f1b2898128e07 100644
--- a/llvm/include/llvm/TargetParser/X86TargetParser.def
+++ b/llvm/include/llvm/TargetParser/X86TargetParser.def
@@ -12,121 +12,112 @@
// NOTE: NO INCLUDE GUARD DESIRED!
+// ABI_VALUE is used throughout the file by compiler frontend to match values
+// in compiler-rt/libgcc.
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Mikołaj Piróg (mikolaj-pirog)
Changes
This is a continuation of previous PR:
https://github.com/llvm/llvm-project/pull/168750
compiler-rt was synced with libgcc on ProcessorVendor and ProcessorSubtype
fields and so was llvm. Cpu type, subtype and vendor entries in
X86TargetParser.def were refactored to use ABI_VALUE.
LLVM doesn't set the ABI_VALUE for its enums -- clang now takes care of that by
reading the ABI_VALUE.
I've removed and added some comments to better explain what is going on.
---
Full diff: https://github.com/llvm/llvm-project/pull/171172.diff
6 Files Affected:
- (modified) clang/lib/Basic/Targets/X86.cpp (+3-5)
- (modified) clang/lib/CodeGen/TargetBuiltins/X86.cpp (+7-11)
- (modified) compiler-rt/lib/builtins/cpu_model/x86.c (+6-3)
- (modified) llvm/include/llvm/TargetParser/X86TargetParser.def (+81-90)
- (modified) llvm/include/llvm/TargetParser/X86TargetParser.h (+4-18)
- (modified) llvm/lib/TargetParser/X86TargetParser.cpp (+2-2)
``diff
diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index f00d435937b92..0c72229623eb1 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -1363,11 +1363,9 @@ void X86TargetInfo::getCPUSpecificCPUDispatchFeatures(
// rather than the full range of cpus.
bool X86TargetInfo::validateCpuIs(StringRef FeatureStr) const {
return llvm::StringSwitch(FeatureStr)
-#define X86_VENDOR(ENUM, STRING) .Case(STRING, true)
-#define X86_CPU_TYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, true)
-#define X86_CPU_TYPE(ENUM, STR) .Case(STR, true)
-#define X86_CPU_SUBTYPE_ALIAS(ENUM, ALIAS) .Case(ALIAS, true)
-#define X86_CPU_SUBTYPE(ENUM, STR) .Case(STR, true)
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE) .Case(STRING, true)
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE) .Case(STR, true)
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE) .Case(STR, true)
#include "llvm/TargetParser/X86TargetParser.def"
.Default(false);
}
diff --git a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
index be2b7d442645e..df63c1ce7b613 100644
--- a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
@@ -628,18 +628,14 @@ Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
cast(CpuModel)->setDSOLocal(true);
// Calculate the index needed to access the correct field based on the
- // range. Also adjust the expected value.
+ // range. ABI_VALUE matches with compiler-rt/libgcc values.
auto [Index, Value] = StringSwitch>(CPUStr)
-#define X86_VENDOR(ENUM, STRING)
\
- .Case(STRING, {0u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_TYPE_ALIAS(ENUM, ALIAS)
\
- .Case(ALIAS, {1u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_TYPE(ENUM, STR)
\
- .Case(STR, {1u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_SUBTYPE_ALIAS(ENUM, ALIAS)
\
- .Case(ALIAS, {2u, static_cast(llvm::X86::ENUM)})
-#define X86_CPU_SUBTYPE(ENUM, STR)
\
- .Case(STR, {2u, static_cast(llvm::X86::ENUM)})
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE)
\
+ .Case(STRING, {0u, ABI_VALUE})
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE)
\
+ .Case(STR, {1u, ABI_VALUE})
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE)
\
+ .Case(STR, {2u, ABI_VALUE})
#include "llvm/TargetParser/X86TargetParser.def"
.Default({0, 0});
assert(Value != 0 && "Invalid CPUStr passed to CpuIs");
diff --git a/compiler-rt/lib/builtins/cpu_model/x86.c
b/compiler-rt/lib/builtins/cpu_model/x86.c
index 8b352cfe568d0..f52561a36622b 100644
--- a/compiler-rt/lib/builtins/cpu_model/x86.c
+++ b/compiler-rt/lib/builtins/cpu_model/x86.c
@@ -41,7 +41,8 @@ enum VendorSignatures {
enum ProcessorVendors {
VENDOR_INTEL = 1,
VENDOR_AMD,
- VENDOR_OTHER,
+ // VENDOR_ZHAOXIN
+ VENDOR_OTHER = 4,
VENDOR_MAX
};
@@ -104,8 +105,10 @@ enum ProcessorSubtypes {
INTEL_COREI7_ARROWLAKE,
INTEL_COREI7_ARROWLAKE_S,
INTEL_COREI7_PANTHERLAKE,
- AMDFAM1AH_ZNVER5,
- INTEL_COREI7_DIAMONDRAPIDS,
+ // ZHAOXIN_FAM7H_YONGFENG
+ AMDFAM1AH_ZNVER5 = 36,
+ // ZHAOXIN_FAM7H_SHIJIDADAO
+ INTEL_COREI7_DIAMONDRAPIDS = 38,
INTEL_COREI7_NOVALAKE,
CPU_SUBTYPE_MAX
};
diff --git a/llvm/include/llvm/TargetParser/X86TargetParser.def
b/llvm/include/llvm/TargetParser/X86TargetParser.def
index 09592bcea27f4..f1b2898128e07 100644
--- a/llvm/include/llvm/TargetParser/X86TargetParser.def
+++ b/llvm/include/llvm/TargetParser/X86TargetParser.def
@@ -12,121 +12,112 @@
// NOTE: NO INCLUDE GUARD DESIRED!
+// ABI_VALUE is used throughout the file by compiler frontend to match values
+// in compiler-rt/libgc
[clang] [compiler-rt] [llvm] [X86] Sync multiversion cpu subtypes and vendors with libgcc and refactor internal cpu type tables (PR #171172)
https://github.com/mikolaj-pirog edited https://github.com/llvm/llvm-project/pull/171172 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
