Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ X86 Support
driver.
- Remove `[no-]evex512` feature request from intrinsics and builtins.
- Change features `avx10.x-[256,512]` to `avx10.x`.
- `-march=wildcatlake` is now supported.

Arm and AArch64 Support
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions clang/lib/Basic/Targets/X86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
case CK_ArrowlakeS:
case CK_Lunarlake:
case CK_Pantherlake:
case CK_Wildcatlake:
case CK_Sierraforest:
case CK_Grandridge:
case CK_Graniterapids:
Expand Down Expand Up @@ -1613,6 +1614,7 @@ std::optional<unsigned> X86TargetInfo::getCPUCacheLineSize() const {
case CK_ArrowlakeS:
case CK_Lunarlake:
case CK_Pantherlake:
case CK_Wildcatlake:
case CK_Sierraforest:
case CK_Grandridge:
case CK_Graniterapids:
Expand Down
5 changes: 5 additions & 0 deletions clang/test/CodeGen/attr-target-mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ int __attribute__((target("arch=gracemont"))) foo(void) {return 24;}
int __attribute__((target("arch=pantherlake"))) foo(void) {return 25;}
int __attribute__((target("arch=clearwaterforest"))) foo(void) {return 26;}
int __attribute__((target("arch=diamondrapids"))) foo(void) {return 27;}
int __attribute__((target("arch=wildcatlake"))) foo(void) {return 28;}
int __attribute__((target("default"))) foo(void) { return 2; }

int bar(void) {
Expand Down Expand Up @@ -203,6 +204,8 @@ void calls_pr50025c(void) { pr50025c(); }
// ITANIUM: ret i32 26
// ITANIUM: define{{.*}} i32 @foo.arch_diamondrapids()
// ITANIUM: ret i32 27
// ITANIUM: define{{.*}} i32 @foo.arch_wildcatlake()
// ITANIUM: ret i32 28
// ITANIUM: define{{.*}} i32 @foo()
// ITANIUM: ret i32 2
// ITANIUM: define{{.*}} i32 @bar()
Expand Down Expand Up @@ -262,6 +265,8 @@ void calls_pr50025c(void) { pr50025c(); }
// WINDOWS: ret i32 26
// WINDOWS: define dso_local i32 @foo.arch_diamondrapids()
// WINDOWS: ret i32 27
// WINDOWS: define dso_local i32 @foo.arch_wildcatlake()
// WINDOWS: ret i32 28
// WINDOWS: define dso_local i32 @foo()
// WINDOWS: ret i32 2
// WINDOWS: define dso_local i32 @bar()
Expand Down
1 change: 1 addition & 0 deletions clang/test/CodeGen/target-builtin-noerror.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ void verifycpustrings(void) {
(void)__builtin_cpu_is("lunarlake");
(void)__builtin_cpu_is("clearwaterforest");
(void)__builtin_cpu_is("pantherlake");
(void)__builtin_cpu_is("wildcatlake");
(void)__builtin_cpu_is("haswell");
(void)__builtin_cpu_is("icelake-client");
(void)__builtin_cpu_is("icelake-server");
Expand Down
4 changes: 4 additions & 0 deletions clang/test/Driver/x86-march.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
// RUN: | FileCheck %s -check-prefix=pantherlake
// pantherlake: "-target-cpu" "pantherlake"
//
// RUN: %clang --target=x86_64 -c -### %s -march=wildcatlake 2>&1 \
// RUN: | FileCheck %s -check-prefix=wildcatlake
// wildcatlake: "-target-cpu" "wildcatlake"
//
// RUN: %clang --target=x86_64 -c -### %s -march=clearwaterforest 2>&1 \
// RUN: | FileCheck %s -check-prefix=clearwaterforest
// clearwaterforest: "-target-cpu" "clearwaterforest"
Expand Down
4 changes: 4 additions & 0 deletions clang/test/Misc/target-invalid-cpu-note/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
// X86-SAME: {{^}}, lunarlake
// X86-SAME: {{^}}, gracemont
// X86-SAME: {{^}}, pantherlake
// X86-SAME: {{^}}, wildcatlake
// X86-SAME: {{^}}, sierraforest
// X86-SAME: {{^}}, grandridge
// X86-SAME: {{^}}, graniterapids
Expand Down Expand Up @@ -150,6 +151,7 @@
// X86_64-SAME: {{^}}, lunarlake
// X86_64-SAME: {{^}}, gracemont
// X86_64-SAME: {{^}}, pantherlake
// X86_64-SAME: {{^}}, wildcatlake
// X86_64-SAME: {{^}}, sierraforest
// X86_64-SAME: {{^}}, grandridge
// X86_64-SAME: {{^}}, graniterapids
Expand Down Expand Up @@ -246,6 +248,7 @@
// TUNE_X86-SAME: {{^}}, lunarlake
// TUNE_X86-SAME: {{^}}, gracemont
// TUNE_X86-SAME: {{^}}, pantherlake
// TUNE_X86-SAME: {{^}}, wildcatlake
// TUNE_X86-SAME: {{^}}, sierraforest
// TUNE_X86-SAME: {{^}}, grandridge
// TUNE_X86-SAME: {{^}}, graniterapids
Expand Down Expand Up @@ -349,6 +352,7 @@
// TUNE_X86_64-SAME: {{^}}, lunarlake
// TUNE_X86_64-SAME: {{^}}, gracemont
// TUNE_X86_64-SAME: {{^}}, pantherlake
// TUNE_X86_64-SAME: {{^}}, wildcatlake
// TUNE_X86_64-SAME: {{^}}, sierraforest
// TUNE_X86_64-SAME: {{^}}, grandridge
// TUNE_X86_64-SAME: {{^}}, graniterapids
Expand Down
6 changes: 6 additions & 0 deletions clang/test/Preprocessor/predefined-arch-macros.c
Original file line number Diff line number Diff line change
Expand Up @@ -2526,6 +2526,9 @@
// RUN: %clang -march=pantherlake -m32 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M32,CHECK_ARLS_M32,CHECK_NKL_M32
// RUN: %clang -march=wildcatlake -m32 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M32,CHECK_ARLS_M32,CHECK_NKL_M32
// RUN: %clang -march=clearwaterforest -m32 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_SRF_M32,CHECK_ARLS_M32,CHECK_CWF_M32,CHECK_NKL_M32
Expand Down Expand Up @@ -2630,6 +2633,9 @@
// RUN: %clang -march=pantherlake -m64 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_NKL_M64
// RUN: %clang -march=wildcatlake -m64 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_ARLS_M64,CHECK_NKL_M64
// RUN: %clang -march=clearwaterforest -m64 -E -dM %s -o - 2>&1 \
// RUN: -target i386-unknown-linux \
// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_ARL_M64,CHECK_SRF_M64,CHECK_ARLS_M64,CHECK_CWF_M64,CHECK_NKL_M64
Expand Down
1 change: 1 addition & 0 deletions clang/test/Sema/attr-cpuspecific-cpus.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@ ATTR(cpu_specific(lunarlake)) void CPU37(void){}
ATTR(cpu_specific(gracemont)) void CPU38(void){}
ATTR(cpu_specific(pantherlake)) void CPU39(void){}
ATTR(cpu_specific(clearwaterforest)) void CPU40(void){}
ATTR(cpu_specific(wildcatlake)) void CPU41(void){}
7 changes: 7 additions & 0 deletions compiler-rt/lib/builtins/cpu_model/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,13 @@ static const char *getIntelProcessorTypeAndSubtype(unsigned Family,
*Subtype = INTEL_COREI7_PANTHERLAKE;
break;

// Wildcatlake:
case 0xd5:
CPU = "wildcatlake";
*Type = INTEL_COREI7;
*Subtype = INTEL_COREI7_PANTHERLAKE;
break;

// Icelake Xeon:
case 0x6a:
case 0x6c:
Expand Down
2 changes: 2 additions & 0 deletions llvm/docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ Changes to the Windows Target
Changes to the X86 Backend
--------------------------

* `-mcpu=wildcatlake` is now supported.

Changes to the OCaml bindings
-----------------------------

Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/TargetParser/X86TargetParser.def
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_ALDERLAKE, "meteorlake")
X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_SAPPHIRERAPIDS, "emeraldrapids")
X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_ARROWLAKE_S,"lunarlake")
X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_ALDERLAKE, "gracemont")
X86_CPU_SUBTYPE_ALIAS(INTEL_COREI7_PANTHERLAKE, "wildcatlake")

#undef X86_CPU_SUBTYPE_ALIAS
#undef X86_CPU_SUBTYPE
Expand Down
1 change: 1 addition & 0 deletions llvm/include/llvm/TargetParser/X86TargetParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ enum CPUKind {
CK_ArrowlakeS,
CK_Lunarlake,
CK_Pantherlake,
CK_Wildcatlake,
CK_Sierraforest,
CK_Grandridge,
CK_Graniterapids,
Expand Down
5 changes: 3 additions & 2 deletions llvm/lib/Target/X86/X86.td
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,6 @@ def ProcessorFeatures {
list<SubtargetFeature> PTLFeatures =
!listremove(ARLSFeatures, [FeatureWIDEKL]);


// Clearwaterforest
list<SubtargetFeature> CWFAdditionalFeatures = [FeaturePREFETCHI,
FeatureAVXVNNIINT16,
Expand Down Expand Up @@ -1880,8 +1879,10 @@ def : ProcModel<P, AlderlakePModel,
}
def : ProcModel<"lunarlake", LunarlakePModel, ProcessorFeatures.ARLSFeatures,
ProcessorFeatures.ADLTuning>;
def : ProcModel<"pantherlake", AlderlakePModel,
foreach P = ["pantherlake", "wildcatlake"] in {
def : ProcModel<P, AlderlakePModel,
ProcessorFeatures.PTLFeatures, ProcessorFeatures.ADLTuning>;
}
def : ProcModel<"clearwaterforest", AlderlakePModel,
ProcessorFeatures.CWFFeatures, ProcessorFeatures.ADLTuning>;
def : ProcModel<"emeraldrapids", SapphireRapidsModel,
Expand Down
7 changes: 7 additions & 0 deletions llvm/lib/TargetParser/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,13 @@ static StringRef getIntelProcessorTypeAndSubtype(unsigned Family,
*Subtype = X86::INTEL_COREI7_PANTHERLAKE;
break;

// Wildcatlake:
case 0xd5:
CPU = "wildcatlake";
*Type = X86::INTEL_COREI7;
*Subtype = X86::INTEL_COREI7_PANTHERLAKE;
break;

// Graniterapids:
case 0xad:
CPU = "graniterapids";
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/TargetParser/X86TargetParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ constexpr ProcInfo Processors[] = {
{ {"gracemont"}, CK_Gracemont, FEATURE_AVX2, FeaturesAlderlake, 'p', false },
// Pantherlake microarchitecture based processors.
{ {"pantherlake"}, CK_Lunarlake, FEATURE_AVX2, FeaturesPantherlake, 'p', false },
{ {"wildcatlake"}, CK_Lunarlake, FEATURE_AVX2, FeaturesPantherlake, 'p', false },
// Sierraforest microarchitecture based processors.
{ {"sierraforest"}, CK_Sierraforest, FEATURE_AVX2, FeaturesSierraforest, 'p', false },
// Grandridge microarchitecture based processors.
Expand Down
2 changes: 2 additions & 0 deletions llvm/test/CodeGen/X86/cpus-intel.ll
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=lunarlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=gracemont 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=pantherlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=wildcatlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=clearwaterforest 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=diamondrapids 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty

Expand Down Expand Up @@ -104,6 +105,7 @@
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=lunarlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=gracemont 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=pantherlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=wildcatlake 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=clearwaterforest 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty
; RUN: llc < %s -o /dev/null -mtriple=x86_64-unknown-unknown -mcpu=diamondrapids 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty

Expand Down