[clang] 1d4c873 - [X86] Assign a feature priority to 'tigerlake' so it won't assert when used with function multiversioning
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 21 13:25:32 PDT 2020
Author: Craig Topper
Date: 2020-06-21T13:24:58-07:00
New Revision: 1d4c87335d5236ea1f35937e1014980ba961ae34
URL: https://github.com/llvm/llvm-project/commit/1d4c87335d5236ea1f35937e1014980ba961ae34
DIFF: https://github.com/llvm/llvm-project/commit/1d4c87335d5236ea1f35937e1014980ba961ae34.diff
LOG: [X86] Assign a feature priority to 'tigerlake' so it won't assert when used with function multiversioning
Also test cooperlake since it was also just added to function
multiversioning when it was enabled for __builtin_cpu_is.
Added:
Modified:
clang/test/CodeGen/attr-target-mv.c
llvm/include/llvm/Support/X86TargetParser.def
Removed:
################################################################################
diff --git a/clang/test/CodeGen/attr-target-mv.c b/clang/test/CodeGen/attr-target-mv.c
index 7d7135d567c2..89b219c25fec 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -9,6 +9,8 @@ int __attribute__((target("arch=goldmont-plus"))) foo(void) {return 4;}
int __attribute__((target("arch=tremont"))) foo(void) {return 5;}
int __attribute__((target("arch=icelake-client"))) foo(void) {return 6;}
int __attribute__((target("arch=icelake-server"))) foo(void) {return 7;}
+int __attribute__((target("arch=cooperlake"))) foo(void) {return 8;}
+int __attribute__((target("arch=tigerlake"))) foo(void) {return 9;}
int __attribute__((target("default"))) foo(void) { return 2; }
int bar() {
@@ -85,6 +87,10 @@ __attribute__((target("avx,sse4.2"), used)) inline void foo_used2(int i, double
// LINUX: ret i32 6
// LINUX: define i32 @foo.arch_icelake-server()
// LINUX: ret i32 7
+// LINUX: define i32 @foo.arch_cooperlake()
+// LINUX: ret i32 8
+// LINUX: define i32 @foo.arch_tigerlake()
+// LINUX: ret i32 9
// LINUX: define i32 @foo()
// LINUX: ret i32 2
// LINUX: define i32 @bar()
diff --git a/llvm/include/llvm/Support/X86TargetParser.def b/llvm/include/llvm/Support/X86TargetParser.def
index afbfd5d26ffe..3c2614b33bf3 100644
--- a/llvm/include/llvm/Support/X86TargetParser.def
+++ b/llvm/include/llvm/Support/X86TargetParser.def
@@ -331,7 +331,7 @@ PROC_WITH_FEAT(IcelakeServer, "icelake-server", PROC_64_BIT, FEATURE_AVX512VBMI2
/// \name Tigerlake
/// Tigerlake microarchitecture based processors.
-PROC(Tigerlake, "tigerlake", PROC_64_BIT)
+PROC_WITH_FEAT(Tigerlake, "tigerlake", PROC_64_BIT, FEATURE_AVX512VP2INTERSECT)
/// \name Knights Landing
/// Knights Landing processor.
More information about the cfe-commits
mailing list