diff options
author | Craig Topper <craig.topper@intel.com> | 2017-11-02 19:13:32 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2017-11-02 19:13:32 +0000 |
commit | a233e16cd880d0ff30268e14e657a10026a47121 (patch) | |
tree | ccde5fed4f69e0235ea072d69edba6202520b9ac /llvm/lib/Support/Host.cpp | |
parent | a15c4deb7b8d848749fae3575dca0a9721db7d87 (diff) | |
download | bcm5719-llvm-a233e16cd880d0ff30268e14e657a10026a47121.tar.gz bcm5719-llvm-a233e16cd880d0ff30268e14e657a10026a47121.zip |
[X86] Change getHostCPUName fallback code to not select 'x86-64' for unknown CPUs in family 6 that has 64-bit support but not any newer SSE features. Use 'core2' instead
We know that's the earliest CPU with 64-bit support. x86-64 has taken on a role of representing a more modern 64-bit CPU so we probably shouldn't be using that when we can't identify things.
llvm-svn: 317229
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index d8fb3e1dc1d..7fbe9ad6a5c 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -794,8 +794,13 @@ getIntelProcessorTypeAndSubtype(unsigned Family, unsigned Model, break; } if (Features2 & (1 << (FEATURE_EM64T - 32))) { - *Type = INTEL_X86_64; - break; // x86-64 + *Type = INTEL_CORE2; // "core2" + *Subtype = INTEL_CORE2_65; + break; + } + if (Features & (1 << FEATURE_SSE3)) { + *Type = INTEL_CORE_DUO; + break; } if (Features & (1 << FEATURE_SSE2)) { *Type = INTEL_PENTIUM_M; |