Skip to content

Commit

Permalink
[X86] Change getHostCPUName to report Intel model 0x4e as "skylake" i…
Browse files Browse the repository at this point in the history
…nstead 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

llvm-svn: 291084
  • Loading branch information
topperc committed Jan 5, 2017
1 parent f0f33a8 commit 1ab35fa
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions llvm/lib/Support/Host.cpp
Expand Up @@ -475,14 +475,22 @@ getIntelProcessorTypeAndSubtype(unsigned int Family, unsigned int Model,

// Skylake:
case 0x4e:
*Type = INTEL_COREI7; // "skylake-avx512"
*Subtype = INTEL_COREI7_SKYLAKE_AVX512;
break;
case 0x5e:
*Type = INTEL_COREI7; // "skylake"
*Subtype = INTEL_COREI7_SKYLAKE;
break;

// Skylake Xeon:
case 0x55:
*Type = INTEL_COREI7;
// Check that we really have AVX512
if (Features & (1 << FEATURE_AVX512)) {
*Subtype = INTEL_COREI7_SKYLAKE_AVX512; // "skylake-avx512"
} else {
*Subtype = INTEL_COREI7_SKYLAKE; // "skylake"
}
break;

case 0x1c: // Most 45 nm Intel Atom processors
case 0x26: // 45 nm Atom Lincroft
case 0x27: // 32 nm Atom Medfield
Expand Down

0 comments on commit 1ab35fa

Please sign in to comment.