Skip to content

Commit 347f43d

Browse files
mikolaj-piroggithub-actions[bot]
authored andcommitted
Automerge: [X86] Add support for Wildcat Lake (#163214)
Add support for Wildcat Lake, per Intel Architecture Instruction Set Extensions Programming Reference rev. 59 (https://cdrdv2.intel.com/v1/dl/getContent/671368)
2 parents d0e9ee7 + 0e6557d commit 347f43d

File tree

16 files changed

+48
-2
lines changed

16 files changed

+48
-2
lines changed

clang/docs/ReleaseNotes.rst

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

519520
Arm and AArch64 Support
520521
^^^^^^^^^^^^^^^^^^^^^^^

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:
@@ -1613,6 +1614,7 @@ std::optional<unsigned> X86TargetInfo::getCPUCacheLineSize() const {
16131614
case CK_ArrowlakeS:
16141615
case CK_Lunarlake:
16151616
case CK_Pantherlake:
1617+
case CK_Wildcatlake:
16161618
case CK_Sierraforest:
16171619
case CK_Grandridge:
16181620
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_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_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_CWF_M32,CHECK_NKL_M32
@@ -2630,6 +2633,9 @@
26302633
// RUN: %clang -march=pantherlake -m64 -E -dM %s -o - 2>&1 \
26312634
// RUN: -target i386-unknown-linux \
26322635
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_NKL_M64
2636+
// RUN: %clang -march=wildcatlake -m64 -E -dM %s -o - 2>&1 \
2637+
// RUN: -target i386-unknown-linux \
2638+
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_NKL_M64
26332639
// RUN: %clang -march=clearwaterforest -m64 -E -dM %s -o - 2>&1 \
26342640
// RUN: -target i386-unknown-linux \
26352641
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_SRF_M64,CHECK_ARLS_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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,13 @@ static const char *getIntelProcessorTypeAndSubtype(unsigned Family,
520520
*Subtype = INTEL_COREI7_PANTHERLAKE;
521521
break;
522522

523+
// Wildcatlake:
524+
case 0xd5:
525+
CPU = "wildcatlake";
526+
*Type = INTEL_COREI7;
527+
*Subtype = INTEL_COREI7_PANTHERLAKE;
528+
break;
529+
523530
// Icelake Xeon:
524531
case 0x6a:
525532
case 0x6c:

llvm/docs/ReleaseNotes.md

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

142+
* `-mcpu=wildcatlake` is now supported.
143+
142144
Changes to the OCaml bindings
143145
-----------------------------
144146

0 commit comments

Comments
 (0)