55 lines · c
1// RUN: %clang -target x86_64 -march=x86-64 -E -dM %s > %tv12// RUN: FileCheck %s --check-prefix=X86_64_V1 < %tv13 4// X86_64_V1: #define __MMX__ 15// X86_64_V1: #define __SSE2_MATH__ 16// X86_64_V1: #define __SSE2__ 17// X86_64_V1: #define __SSE_MATH__ 18// X86_64_V1: #define __SSE__ 19// X86_64_V1: #define __amd64 110// X86_64_V1: #define __amd64__ 111// X86_64_V1: #define __k8 112// X86_64_V1: #define __k8__ 113// X86_64_V1: #define __x86_64 114// X86_64_V1: #define __x86_64__ 115 16// RUN: %clang -target x86_64 -march=x86-64-v2 -E -dM %s > %tv217// RUN: diff %tv1 %tv2 > %t.txt || true18// RUN: FileCheck %s --check-prefix=X86_64_V2 < %t.txt19 20/// v2 is close to Nehalem.21// X86_64_V2: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 122// X86_64_V2: #define __LAHF_SAHF__ 123// X86_64_V2: #define __POPCNT__ 124// X86_64_V2: #define __SSE3__ 125// X86_64_V2-NEXT: #define __SSE4_1__ 126// X86_64_V2-NEXT: #define __SSE4_2__ 127// X86_64_V2: #define __SSSE3__ 128 29/// v3 is close to Haswell.30// RUN: %clang -target x86_64 -march=x86-64-v3 -E -dM %s > %tv331// RUN: diff %tv2 %tv3 > %t.txt || true32// RUN: FileCheck %s --check-prefix=X86_64_V3 < %t.txt33 34// X86_64_V3: #define __AVX2__ 135// X86_64_V3-NEXT: #define __AVX__ 136// X86_64_V3: #define __BMI2__ 137// X86_64_V3-NEXT: #define __BMI__ 138// X86_64_V3: #define __F16C__ 139// X86_64_V3: #define __FMA__ 140// X86_64_V3: #define __LZCNT__ 141// X86_64_V3: #define __MOVBE__ 142// X86_64_V3: #define __XSAVE__ 143 44/// v4 is close to the AVX-512 level implemented by Xeon Scalable Processors.45// RUN: %clang -target x86_64 -march=x86-64-v4 -E -dM %s > %tv446// RUN: diff %tv3 %tv4 > %t.txt || true47// RUN: FileCheck %s --check-prefix=X86_64_V4 < %t.txt48 49// X86_64_V4: #define __AVX512BW__ 150// X86_64_V4-NEXT: #define __AVX512CD__ 151// X86_64_V4-NEXT: #define __AVX512DQ__ 152// X86_64_V4-NEXT: #define __AVX512F__ 153// X86_64_V4-NEXT: #define __AVX512VL__ 154// X86_64_V4-NOT: #define __AVX512{{.*}}55