diff --git a/lib/Support/Host.cpp b/lib/Support/Host.cpp index dc90c8cc4ae..83f25463a14 100644 --- a/lib/Support/Host.cpp +++ b/lib/Support/Host.cpp @@ -435,6 +435,8 @@ StringRef sys::getHostCPUName() { case 21: if (!HasAVX) // If the OS doesn't support AVX provide a sane fallback. return "btver1"; + if (Model >= 0x50) + return "bdver4"; // 50h-6Fh: Excavator if (Model >= 0x30) return "bdver3"; // 30h-3Fh: Steamroller if (Model >= 0x10) diff --git a/lib/Target/X86/X86.td b/lib/Target/X86/X86.td index 78edcf04788..423c2c973d0 100644 --- a/lib/Target/X86/X86.td +++ b/lib/Target/X86/X86.td @@ -329,6 +329,13 @@ def : Proc<"bdver3", [FeatureXOP, FeatureFMA4, FeatureCMPXCHG16B, FeaturePOPCNT, FeatureBMI, FeatureTBM, FeatureFMA, FeatureFSGSBase]>; +// Excavator +def : Proc<"bdver4", [FeatureAVX2, FeatureXOP, FeatureFMA4, + FeatureCMPXCHG16B, FeatureAES, FeaturePRFCHW, + FeaturePCLMUL, FeatureF16C, FeatureLZCNT, + FeaturePOPCNT, FeatureBMI, FeatureBMI2, + FeatureTBM, FeatureFMA, FeatureFSGSBase]>; + def : Proc<"geode", [Feature3DNowA]>; def : Proc<"winchip-c6", [FeatureMMX]>;