def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>;
def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>;
def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>;
-def mno_avx512pd : Flag<["-"], "mno-avx512pd">, Group<m_x86_Features_Group>;
+def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>;
def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>;
def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>;
def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>;
def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>;
def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>;
def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>;
-def mavx512pd : Flag<["-"], "mavx512pd">, Group<m_x86_Features_Group>;
+def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>;
def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>;
def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>;
def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>;
// AVX: #define __SSE__ 1
// AVX: #define __SSSE3__ 1
-
// RUN: %clang -target i386-unknown-unknown -march=pentium-m -mxop -mno-avx -x c -E -dM -o - %s | FileCheck --check-prefix=SSE4A %s
// SSE4A: #define __SSE2_MATH__ 1
// SSE4A: #define __SSE_MATH__ 1
// SSE4A: #define __SSE__ 1
// SSE4A: #define __SSSE3__ 1
+
+// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512f -x c -E -dM -o - %s | FileCheck --check-prefix=AVX512F %s
+
+// AVX512F: #define __AVX2__ 1
+// AVX512F: #define __AVX512F__ 1
+// AVX512F: #define __AVX__ 1
+// AVX512F: #define __SSE2_MATH__ 1
+// AVX512F: #define __SSE2__ 1
+// AVX512F: #define __SSE3__ 1
+// AVX512F: #define __SSE4_1__ 1
+// AVX512F: #define __SSE4_2__ 1
+// AVX512F: #define __SSE_MATH__ 1
+// AVX512F: #define __SSE__ 1
+// AVX512F: #define __SSSE3__ 1
+
+// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512cd -x c -E -dM -o - %s | FileCheck --check-prefix=AVX512CD %s
+
+// AVX512CD: #define __AVX2__ 1
+// AVX512CD: #define __AVX512CD__ 1
+// AVX512CD: #define __AVX512F__ 1
+// AVX512CD: #define __AVX__ 1
+// AVX512CD: #define __SSE2_MATH__ 1
+// AVX512CD: #define __SSE2__ 1
+// AVX512CD: #define __SSE3__ 1
+// AVX512CD: #define __SSE4_1__ 1
+// AVX512CD: #define __SSE4_2__ 1
+// AVX512CD: #define __SSE_MATH__ 1
+// AVX512CD: #define __SSE__ 1
+// AVX512CD: #define __SSSE3__ 1
+
+// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512er -x c -E -dM -o - %s | FileCheck --check-prefix=AVX512ER %s
+
+// AVX512ER: #define __AVX2__ 1
+// AVX512ER: #define __AVX512ER__ 1
+// AVX512ER: #define __AVX512F__ 1
+// AVX512ER: #define __AVX__ 1
+// AVX512ER: #define __SSE2_MATH__ 1
+// AVX512ER: #define __SSE2__ 1
+// AVX512ER: #define __SSE3__ 1
+// AVX512ER: #define __SSE4_1__ 1
+// AVX512ER: #define __SSE4_2__ 1
+// AVX512ER: #define __SSE_MATH__ 1
+// AVX512ER: #define __SSE__ 1
+// AVX512ER: #define __SSSE3__ 1
+
+// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512pf -x c -E -dM -o - %s | FileCheck --check-prefix=AVX512PF %s
+
+// AVX512PF: #define __AVX2__ 1
+// AVX512PF: #define __AVX512F__ 1
+// AVX512PF: #define __AVX512PF__ 1
+// AVX512PF: #define __AVX__ 1
+// AVX512PF: #define __SSE2_MATH__ 1
+// AVX512PF: #define __SSE2__ 1
+// AVX512PF: #define __SSE3__ 1
+// AVX512PF: #define __SSE4_1__ 1
+// AVX512PF: #define __SSE4_2__ 1
+// AVX512PF: #define __SSE_MATH__ 1
+// AVX512PF: #define __SSE__ 1
+// AVX512PF: #define __SSSE3__ 1
+
+// RUN: %clang -target i386-unknown-unknown -march=atom -mavx512pf -mno-avx512f -x c -E -dM -o - %s | FileCheck --check-prefix=AVX512F2 %s
+
+// AVX512F2: #define __AVX2__ 1
+// AVX512F2-NOT: #define __AVX512F__ 1
+// AVX512F2-NOT: #define __AVX512PF__ 1
+// AVX512F2: #define __AVX__ 1
+// AVX512F2: #define __SSE2_MATH__ 1
+// AVX512F2: #define __SSE2__ 1
+// AVX512F2: #define __SSE3__ 1
+// AVX512F2: #define __SSE4_1__ 1
+// AVX512F2: #define __SSE4_2__ 1
+// AVX512F2: #define __SSE_MATH__ 1
+// AVX512F2: #define __SSE__ 1
+// AVX512F2: #define __SSSE3__ 1