[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.
This commit is contained in:
Craig Topper 2020-06-21 13:24:43 -07:00
parent 6bdd531af5
commit 1d4c87335d
2 changed files with 7 additions and 1 deletions

View File

@ -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()

View File

@ -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.