diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-07-29 11:02:08 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-07-29 11:02:08 +0000 |
commit | fb34989a82aec9762d16587c9b89973165a53e4a (patch) | |
tree | 8393fbfa1e6aea6328df1b67f12c2e846f9b895a /llvm/lib/Support | |
parent | 91ddaa1b48f720a66b070148aba830e21bb0056f (diff) | |
download | bcm5719-llvm-fb34989a82aec9762d16587c9b89973165a53e4a.tar.gz bcm5719-llvm-fb34989a82aec9762d16587c9b89973165a53e4a.zip |
Some Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.
PR16721.
llvm-svn: 187350
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/Host.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 40e7a494fdc..90e43894c3c 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -149,6 +149,7 @@ std::string sys::getHostCPUName() { DetectX86FamilyModel(EAX, Family, Model); bool HasSSE3 = (ECX & 0x1); + bool HasSSE41 = (ECX & 0x80000); // If CPUID indicates support for XSAVE, XRESTORE and AVX, and XGETBV // indicates that the AVX registers will be saved and restored on context // switch, then we have full AVX support. @@ -244,7 +245,8 @@ std::string sys::getHostCPUName() { // 17h. All processors are manufactured using the 45 nm process. // // 45nm: Penryn , Wolfdale, Yorkfield (XE) - return "penryn"; + // Not all Penryn processors support SSE 4.1 (such as the Pentium brand) + return HasSSE41 ? "penryn" : "core2"; case 26: // Intel Core i7 processor and Intel Xeon processor. All // processors are manufactured using the 45 nm process. |