Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 6974a46

Browse files
committed
[X86] Change getHostCPUName to report Intel model 0x4e as "skylake" instead of "skylake-avx512". Add the proper 0x55 model for "skylake-avx512".
Summary: Intel's i5-6300U CPU is reporting to have a model id of 78 (4e). The Host detection assumes that to be Skylake Xeon (with AVX512 support), instead of a normal Skylake machine. Patch by: Valentin Churavy Reviewers: nalimilan, craig.topper Subscribers: hfinkel, tkelman, craig.topper, nalimilan, llvm-commits Differential Revision: https://reviews.llvm.org/D28221 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291084 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 87a1420 commit 6974a46

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lib/Support/Host.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,14 +475,22 @@ getIntelProcessorTypeAndSubtype(unsigned int Family, unsigned int Model,
475475

476476
// Skylake:
477477
case 0x4e:
478-
*Type = INTEL_COREI7; // "skylake-avx512"
479-
*Subtype = INTEL_COREI7_SKYLAKE_AVX512;
480-
break;
481478
case 0x5e:
482479
*Type = INTEL_COREI7; // "skylake"
483480
*Subtype = INTEL_COREI7_SKYLAKE;
484481
break;
485482

483+
// Skylake Xeon:
484+
case 0x55:
485+
*Type = INTEL_COREI7;
486+
// Check that we really have AVX512
487+
if (Features & (1 << FEATURE_AVX512)) {
488+
*Subtype = INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512"
489+
} else {
490+
*Subtype = INTEL_COREI7_SKYLAKE; // "skylake"
491+
}
492+
break;
493+
486494
case 0x1c: // Most 45 nm Intel Atom processors
487495
case 0x26: // 45 nm Atom Lincroft
488496
case 0x27: // 32 nm Atom Medfield

0 commit comments

Comments
 (0)