From d44db7e486d7f9e7c559ee38fa3ca047f579924c Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 26 Feb 2019 19:17:12 +0000 Subject: [PATCH] [X86] Use X86_CPU_SUBTYPE_COMPAT for 'cascadelake' cpu. This CPU is supported by at least libgcc trunk now so we should make it available to __builtin_cpu_is. llvm-svn: 354913 --- llvm/include/llvm/Support/X86TargetParser.def | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/Support/X86TargetParser.def b/llvm/include/llvm/Support/X86TargetParser.def index 2b5936b..27adbfe 100644 --- a/llvm/include/llvm/Support/X86TargetParser.def +++ b/llvm/include/llvm/Support/X86TargetParser.def @@ -33,6 +33,8 @@ X86_VENDOR(VENDOR_AMD, "amd") #ifndef X86_CPU_TYPE #define X86_CPU_TYPE(ARCHNAME, ENUM) #endif +// The first part of this list must match what is implemented in libgcc and +// compilert-rt. Clang uses this to know how to implement __builtin_cpu_is. X86_CPU_TYPE_COMPAT_WITH_ALIAS("bonnell", INTEL_BONNELL, "bonnell", "atom") X86_CPU_TYPE_COMPAT ("core2", INTEL_CORE2, "core2") X86_CPU_TYPE_COMPAT ("nehalem", INTEL_COREI7, "corei7") @@ -79,6 +81,8 @@ X86_CPU_TYPE ("k8-sse3", AMD_K8SSE3) #define X86_CPU_SUBTYPE(ARCHNAME, ENUM) #endif +// The first part of this list must match what is implemented in libgcc and +// compilert-rt. Clang uses this to know how to implement __builtin_cpu_is. X86_CPU_SUBTYPE_COMPAT("nehalem", INTEL_COREI7_NEHALEM, "nehalem") X86_CPU_SUBTYPE_COMPAT("westmere", INTEL_COREI7_WESTMERE, "westmere") X86_CPU_SUBTYPE_COMPAT("sandybridge", INTEL_COREI7_SANDYBRIDGE, "sandybridge") @@ -99,10 +103,10 @@ X86_CPU_SUBTYPE_COMPAT("cannonlake", INTEL_COREI7_CANNONLAKE, "cannonlak X86_CPU_SUBTYPE_COMPAT("icelake-client", INTEL_COREI7_ICELAKE_CLIENT, "icelake-client") 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") // Entries below this are not in libgcc/compiler-rt. X86_CPU_SUBTYPE ("core2", INTEL_CORE2_65) X86_CPU_SUBTYPE ("penryn", INTEL_CORE2_45) -X86_CPU_SUBTYPE ("cascadelake", INTEL_COREI7_CASCADELAKE) X86_CPU_SUBTYPE ("k6", AMDPENTIUM_K6) X86_CPU_SUBTYPE ("k6-2", AMDPENTIUM_K62) X86_CPU_SUBTYPE ("k6-3", AMDPENTIUM_K63) -- 2.7.4