Skip to content

Commit 85603c4

Browse files
committed
Add support for wildcatlake
1 parent 55ed34c commit 85603c4

File tree

16 files changed

+51
-0
lines changed

16 files changed

+51
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ X86 Support
511511
driver.
512512
- Remove `[no-]evex512` feature request from intrinsics and builtins.
513513
- Change features `avx10.x-[256,512]` to `avx10.x`.
514+
- `-march=wildcatlake` is now supported.
514515

515516
Arm and AArch64 Support
516517
^^^^^^^^^^^^^^^^^^^^^^^

clang/lib/Basic/Targets/X86.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
625625
case CK_ArrowlakeS:
626626
case CK_Lunarlake:
627627
case CK_Pantherlake:
628+
case CK_Wildcatlake:
628629
case CK_Sierraforest:
629630
case CK_Grandridge:
630631
case CK_Graniterapids:
@@ -1612,6 +1613,7 @@ std::optional<unsigned> X86TargetInfo::getCPUCacheLineSize() const {
16121613
case CK_ArrowlakeS:
16131614
case CK_Lunarlake:
16141615
case CK_Pantherlake:
1616+
case CK_Wildcatlake:
16151617
case CK_Sierraforest:
16161618
case CK_Grandridge:
16171619
case CK_Graniterapids:

clang/test/CodeGen/attr-target-mv.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
3030
int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
3131
int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
3232
int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
33+
int __attribute__((target("arch=wildcatlake"))) foo(void) {return 28;}
3334
int __attribute__((target("default"))) foo(void) { return 2; }
3435

3536
int bar(void) {
@@ -203,6 +204,8 @@ void calls_pr50025c(void) { pr50025c(); }
203204
// ITANIUM: ret i32 26
204205
// ITANIUM: define{{.*}} i32 @foo.arch_diamondrapids()
205206
// ITANIUM: ret i32 27
207+
// ITANIUM: define{{.*}} i32 @foo.arch_wildcatlake()
208+
// ITANIUM: ret i32 28
206209
// ITANIUM: define{{.*}} i32 @foo()
207210
// ITANIUM: ret i32 2
208211
// ITANIUM: define{{.*}} i32 @bar()
@@ -262,6 +265,8 @@ void calls_pr50025c(void) { pr50025c(); }
262265
// WINDOWS: ret i32 26
263266
// WINDOWS: define dso_local i32 @foo.arch_diamondrapids()
264267
// WINDOWS: ret i32 27
268+
// WINDOWS: define dso_local i32 @foo.arch_wildcatlake()
269+
// WINDOWS: ret i32 28
265270
// WINDOWS: define dso_local i32 @foo()
266271
// WINDOWS: ret i32 2
267272
// WINDOWS: define dso_local i32 @bar()

clang/test/CodeGen/target-builtin-noerror.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ void verifycpustrings(void) {
178178
(void)__builtin_cpu_is("lunarlake");
179179
(void)__builtin_cpu_is("clearwaterforest");
180180
(void)__builtin_cpu_is("pantherlake");
181+
(void)__builtin_cpu_is("wildcatlake");
181182
(void)__builtin_cpu_is("haswell");
182183
(void)__builtin_cpu_is("icelake-client");
183184
(void)__builtin_cpu_is("icelake-server");

clang/test/Driver/x86-march.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@
116116
// RUN: | FileCheck %s -check-prefix=pantherlake
117117
// pantherlake: "-target-cpu" "pantherlake"
118118
//
119+
// RUN: %clang --target=x86_64 -c -### %s -march=wildcatlake 2>&1 \
120+
// RUN: | FileCheck %s -check-prefix=wildcatlake
121+
// wildcatlake: "-target-cpu" "wildcatlake"
122+
//
119123
// RUN: %clang --target=x86_64 -c -### %s -march=clearwaterforest 2>&1 \
120124
// RUN: | FileCheck %s -check-prefix=clearwaterforest
121125
// clearwaterforest: "-target-cpu" "clearwaterforest"

clang/test/Misc/target-invalid-cpu-note/x86.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
// X86-SAME: {{^}}, lunarlake
6464
// X86-SAME: {{^}}, gracemont
6565
// X86-SAME: {{^}}, pantherlake
66+
// X86-SAME: {{^}}, wildcatlake
6667
// X86-SAME: {{^}}, sierraforest
6768
// X86-SAME: {{^}}, grandridge
6869
// X86-SAME: {{^}}, graniterapids
@@ -150,6 +151,7 @@
150151
// X86_64-SAME: {{^}}, lunarlake
151152
// X86_64-SAME: {{^}}, gracemont
152153
// X86_64-SAME: {{^}}, pantherlake
154+
// X86_64-SAME: {{^}}, wildcatlake
153155
// X86_64-SAME: {{^}}, sierraforest
154156
// X86_64-SAME: {{^}}, grandridge
155157
// X86_64-SAME: {{^}}, graniterapids
@@ -246,6 +248,7 @@
246248
// TUNE_X86-SAME: {{^}}, lunarlake
247249
// TUNE_X86-SAME: {{^}}, gracemont
248250
// TUNE_X86-SAME: {{^}}, pantherlake
251+
// TUNE_X86-SAME: {{^}}, wildcatlake
249252
// TUNE_X86-SAME: {{^}}, sierraforest
250253
// TUNE_X86-SAME: {{^}}, grandridge
251254
// TUNE_X86-SAME: {{^}}, graniterapids
@@ -349,6 +352,7 @@
349352
// TUNE_X86_64-SAME: {{^}}, lunarlake
350353
// TUNE_X86_64-SAME: {{^}}, gracemont
351354
// TUNE_X86_64-SAME: {{^}}, pantherlake
355+
// TUNE_X86_64-SAME: {{^}}, wildcatlake
352356
// TUNE_X86_64-SAME: {{^}}, sierraforest
353357
// TUNE_X86_64-SAME: {{^}}, grandridge
354358
// TUNE_X86_64-SAME: {{^}}, graniterapids

clang/test/Preprocessor/predefined-arch-macros.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,9 @@
25262526
// RUN: %clang -march=pantherlake -m32 -E -dM %s -o - 2>&1 \
25272527
// RUN: -target i386-unknown-linux \
25282528
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M32,CHECK_ARLS_M32,CHECK_PTL_M32,CHECK_NKL_M32
2529+
// RUN: %clang -march=wildcatlake -m32 -E -dM %s -o - 2>&1 \
2530+
// RUN: -target i386-unknown-linux \
2531+
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M32,CHECK_ARLS_M32,CHECK_PTL_M32,CHECK_NKL_M32
25292532
// RUN: %clang -march=clearwaterforest -m32 -E -dM %s -o - 2>&1 \
25302533
// RUN: -target i386-unknown-linux \
25312534
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32,CHECK_PTL_M32,CHECK_CWF_M32,CHECK_NKL_M32
@@ -2631,6 +2634,9 @@
26312634
// RUN: %clang -march=pantherlake -m64 -E -dM %s -o - 2>&1 \
26322635
// RUN: -target i386-unknown-linux \
26332636
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_PTL_M64,CHECK_NKL_M64
2637+
// RUN: %clang -march=wildcatlake -m64 -E -dM %s -o - 2>&1 \
2638+
// RUN: -target i386-unknown-linux \
2639+
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_PTL_M64,CHECK_NKL_M64
26342640
// RUN: %clang -march=clearwaterforest -m64 -E -dM %s -o - 2>&1 \
26352641
// RUN: -target i386-unknown-linux \
26362642
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_SRF_M64,CHECK_ARLS_M64,CHECK_PTL_M64,CHECK_CWF_M64,CHECK_NKL_M64

clang/test/Sema/attr-cpuspecific-cpus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ ATTR(cpu_specific(lunarlake)) void CPU37(void){}
8787
ATTR(cpu_specific(gracemont)) void CPU38(void){}
8888
ATTR(cpu_specific(pantherlake)) void CPU39(void){}
8989
ATTR(cpu_specific(clearwaterforest)) void CPU40(void){}
90+
ATTR(cpu_specific(wildcatlake)) void CPU41(void){}

compiler-rt/lib/builtins/cpu_model/x86.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ enum ProcessorSubtypes {
104104
INTEL_COREI7_PANTHERLAKE,
105105
AMDFAM1AH_ZNVER5,
106106
INTEL_COREI7_DIAMONDRAPIDS,
107+
INTEL_COREI7_WILDCATLAKE,
107108
CPU_SUBTYPE_MAX
108109
};
109110

@@ -520,6 +521,13 @@ static const char *getIntelProcessorTypeAndSubtype(unsigned Family,
520521
*Subtype = INTEL_COREI7_PANTHERLAKE;
521522
break;
522523

524+
// Wildcatlake:
525+
case 0xd5:
526+
CPU = "wildcatlake";
527+
*Type = INTEL_COREI7;
528+
*Subtype = INTEL_COREI7_WILDCATLAKE;
529+
break;
530+
523531
// Icelake Xeon:
524532
case 0x6a:
525533
case 0x6c:

llvm/docs/ReleaseNotes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ Changes to the Windows Target
137137
Changes to the X86 Backend
138138
--------------------------
139139

140+
* `-mcpu=wildcatlake` is now supported.
141+
140142
Changes to the OCaml bindings
141143
-----------------------------
142144

0 commit comments

Comments
 (0)