diff options
Diffstat (limited to 'lib/Support/Host.cpp')
-rw-r--r-- | lib/Support/Host.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp index 27c99c89ae..8657abc1be 100644 --- a/lib/Support/Host.cpp +++ b/lib/Support/Host.cpp @@ -355,10 +355,15 @@ std::string sys::getHostCPUName() { case 20: return "btver1"; case 21: - if (Model <= 15) - return "bdver1"; - else if (Model <= 31) + if (!HasAVX) // If the OS doesn't support AVX provide a sane fallback. + return "btver1"; + if (Model > 15 && Model <= 31) return "bdver2"; + return "bdver1"; + case 22: + if (!HasAVX) // If the OS doesn't support AVX provide a sane fallback. + return "btver1"; + return "btver2"; default: return "generic"; } |