[X86] Stop changing result of getHostCPUName based on whether the processor supports AVX. getHostCPUFeatures should be used instead to determine whether to support AVX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233674 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2015-03-31 06:18:31 +00:00
parent 9a7c0031de
commit cd83d5b507

View File

@ -334,8 +334,7 @@ StringRef sys::getHostCPUName() {
// 45nm: Penryn , Wolfdale, Yorkfield (XE) // 45nm: Penryn , Wolfdale, Yorkfield (XE)
case 29: // Intel Xeon processor MP. All processors are manufactured using case 29: // Intel Xeon processor MP. All processors are manufactured using
// the 45 nm process. // the 45 nm process.
// Not all Penryn processors support SSE 4.1 (such as the Pentium brand) return "penryn";
return HasSSE41 ? "penryn" : "core2";
case 26: // Intel Core i7 processor and Intel Xeon processor. All case 26: // Intel Core i7 processor and Intel Xeon processor. All
// processors are manufactured using the 45 nm process. // processors are manufactured using the 45 nm process.
@ -353,31 +352,23 @@ StringRef sys::getHostCPUName() {
case 42: // Intel Core i7 processor. All processors are manufactured case 42: // Intel Core i7 processor. All processors are manufactured
// using the 32 nm process. // using the 32 nm process.
case 45: case 45:
// Not all Sandy Bridge processors support AVX (such as the Pentium return "sandybridge";
// versions instead of the i7 versions).
return HasAVX ? "sandybridge" : "nehalem";
// Ivy Bridge: // Ivy Bridge:
case 58: case 58:
case 62: // Ivy Bridge EP case 62: // Ivy Bridge EP
// Not all Ivy Bridge processors support AVX (such as the Pentium return "ivybridge";
// versions instead of the i7 versions).
return HasAVX ? "ivybridge" : "nehalem";
// Haswell: // Haswell:
case 60: case 60:
case 63: case 63:
case 69: case 69:
case 70: case 70:
// Not all Haswell processors support AVX2 (such as the Pentium return "haswell";
// versions instead of the i7 versions).
return HasAVX2 ? "haswell" : "nehalem";
// Broadwell: // Broadwell:
case 61: case 61:
// Not all Broadwell processors support AVX2 (such as the Pentium return "broadwell";
// versions instead of the i7 versions).
return HasAVX2 ? "broadwell" : "nehalem";
case 28: // Most 45 nm Intel Atom processors case 28: // Most 45 nm Intel Atom processors
case 38: // 45 nm Atom Lincroft case 38: // 45 nm Atom Lincroft