[X86] Add 'cooperlake' and 'tigerlake' to __builtin_cpu_is.
authorCraig Topper <craig.topper@intel.com>
Sun, 21 Jun 2020 18:30:00 +0000 (11:30 -0700)
committerCraig Topper <craig.topper@intel.com>
Sun, 21 Jun 2020 20:03:18 +0000 (13:03 -0700)
Cooperlake can be detect by compiler-rt now, but not libgcc yet.
Tigerlake can't be detected by either. Both names are accepted by
gcc. Hopefully the detection code will be in place soon.

clang/test/CodeGen/target-builtin-noerror.c
llvm/include/llvm/Support/X86TargetParser.def

index 54c5a9b..b2d18fa 100644 (file)
@@ -101,6 +101,7 @@ void verifycpustrings() {
   (void)__builtin_cpu_is("btver2");
   (void)__builtin_cpu_is("cannonlake");
   (void)__builtin_cpu_is("cascadelake");
+  (void)__builtin_cpu_is("cooperlake");
   (void)__builtin_cpu_is("core2");
   (void)__builtin_cpu_is("corei7");
   (void)__builtin_cpu_is("goldmont");
@@ -120,6 +121,7 @@ void verifycpustrings() {
   (void)__builtin_cpu_is("skylake");
   (void)__builtin_cpu_is("skylake-avx512");
   (void)__builtin_cpu_is("slm");
+  (void)__builtin_cpu_is("tigerlake");
   (void)__builtin_cpu_is("tremont");
   (void)__builtin_cpu_is("westmere");
   (void)__builtin_cpu_is("znver1");
index 38d1498..afbfd5d 100644 (file)
@@ -110,6 +110,8 @@ X86_CPU_SUBTYPE_COMPAT("icelake-client", INTEL_COREI7_ICELAKE_CLIENT, "icelake-c
 X86_CPU_SUBTYPE_COMPAT("icelake-server", INTEL_COREI7_ICELAKE_SERVER, "icelake-server")
 X86_CPU_SUBTYPE_COMPAT("znver2",         AMDFAM17H_ZNVER2,            "znver2")
 X86_CPU_SUBTYPE_COMPAT("cascadelake",    INTEL_COREI7_CASCADELAKE,    "cascadelake")
+X86_CPU_SUBTYPE_COMPAT("tigerlake",      INTEL_COREI7_TIGERLAKE,      "tigerlake")
+X86_CPU_SUBTYPE_COMPAT("cooperlake",     INTEL_COREI7_COOPERLAKE,     "cooperlake")
 // Entries below this are not in libgcc/compiler-rt.
 X86_CPU_SUBTYPE       ("core2",          INTEL_CORE2_65)
 X86_CPU_SUBTYPE       ("penryn",         INTEL_CORE2_45)
@@ -117,8 +119,6 @@ X86_CPU_SUBTYPE       ("k6",             AMDPENTIUM_K6)
 X86_CPU_SUBTYPE       ("k6-2",           AMDPENTIUM_K62)
 X86_CPU_SUBTYPE       ("k6-3",           AMDPENTIUM_K63)
 X86_CPU_SUBTYPE       ("geode",          AMDPENTIUM_GEODE)
-X86_CPU_SUBTYPE       ("cooperlake",     INTEL_COREI7_COOPERLAKE)
-X86_CPU_SUBTYPE       ("tigerlake",      INTEL_COREI7_TIGERLAKE)
 #undef X86_CPU_SUBTYPE_COMPAT
 #undef X86_CPU_SUBTYPE