From 8dd10149220bca422ddbcd7dfa56aa51363c6e6a Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 25 Oct 2017 17:10:58 +0000 Subject: [PATCH] [X86] Add avx512vpopcntdq to Knights Mill As indicated by Table 1-1 in Intel Architecture Instruction Set Extensions and Future Features Programming Reference from October 2017. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316593 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets/X86.cpp | 2 ++ test/Preprocessor/predefined-arch-macros.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/Basic/Targets/X86.cpp b/lib/Basic/Targets/X86.cpp index 644cf467b0..d2716ac670 100644 --- a/lib/Basic/Targets/X86.cpp +++ b/lib/Basic/Targets/X86.cpp @@ -231,6 +231,8 @@ bool X86TargetInfo::initFeatureMap( case CK_KNM: // TODO: Add avx5124fmaps/avx5124vnniw. + setFeatureEnabledImpl(Features, "avx512vpopcntdq", true); + LLVM_FALLTHROUGH; case CK_KNL: setFeatureEnabledImpl(Features, "avx512f", true); setFeatureEnabledImpl(Features, "avx512cd", true); diff --git a/test/Preprocessor/predefined-arch-macros.c b/test/Preprocessor/predefined-arch-macros.c index 06faf0eade..43dc469d3e 100644 --- a/test/Preprocessor/predefined-arch-macros.c +++ b/test/Preprocessor/predefined-arch-macros.c @@ -793,6 +793,7 @@ // CHECK_KNM_M32: #define __AVX512ER__ 1 // CHECK_KNM_M32: #define __AVX512F__ 1 // CHECK_KNM_M32: #define __AVX512PF__ 1 +// CHECK_KNM_M32: #define __AVX512VPOPCNTDQ__ 1 // CHECK_KNM_M32: #define __AVX__ 1 // CHECK_KNM_M32: #define __BMI2__ 1 // CHECK_KNM_M32: #define __BMI__ 1 @@ -826,6 +827,7 @@ // CHECK_KNM_M64: #define __AVX512ER__ 1 // CHECK_KNM_M64: #define __AVX512F__ 1 // CHECK_KNM_M64: #define __AVX512PF__ 1 +// CHECK_KNM_M64: #define __AVX512VPOPCNTDQ__ 1 // CHECK_KNM_M64: #define __AVX__ 1 // CHECK_KNM_M64: #define __BMI2__ 1 // CHECK_KNM_M64: #define __BMI__ 1 -- 2.40.0