diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c --- a/clang/test/Preprocessor/predefined-arch-macros.c +++ b/clang/test/Preprocessor/predefined-arch-macros.c @@ -365,9 +365,13 @@ // RUN: %clang -march=core2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE2_M32 +// RUN: %clang -march=penryn -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_CORE2_M32,CHECK_PENRYN_M32 // CHECK_CORE2_M32: #define __MMX__ 1 // CHECK_CORE2_M32: #define __SSE2__ 1 // CHECK_CORE2_M32: #define __SSE3__ 1 +// CHECK_PENRYN_M32: #define __SSE4_1__ 1 // CHECK_CORE2_M32: #define __SSE__ 1 // CHECK_CORE2_M32: #define __SSSE3__ 1 // CHECK_CORE2_M32: #define __core2 1 @@ -380,10 +384,14 @@ // RUN: %clang -march=core2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE2_M64 +// RUN: %clang -march=penryn -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_CORE2_M64,CHECK_PENRYN_M64 // CHECK_CORE2_M64: #define __MMX__ 1 // CHECK_CORE2_M64: #define __SSE2_MATH__ 1 // CHECK_CORE2_M64: #define __SSE2__ 1 // CHECK_CORE2_M64: #define __SSE3__ 1 +// CHECK_PENRYN_M64: #define __SSE4_1__ 1 // CHECK_CORE2_M64: #define __SSE_MATH__ 1 // CHECK_CORE2_M64: #define __SSE__ 1 // CHECK_CORE2_M64: #define __SSSE3__ 1 @@ -398,7 +406,15 @@ // RUN: %clang -march=corei7 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M32 +// RUN: %clang -march=nehalem -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M32 +// RUN: %clang -march=westmere -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_COREI7_M32,CHECK_WESTMERE_M32 +// CHECK_COREI7_M32: #define __CRC32__ 1 // CHECK_COREI7_M32: #define __MMX__ 1 +// CHECK_WESTMERE_M32: #define __PCLMUL__ 1 // CHECK_COREI7_M32: #define __POPCNT__ 1 // CHECK_COREI7_M32: #define __SSE2__ 1 // CHECK_COREI7_M32: #define __SSE3__ 1 @@ -416,7 +432,15 @@ // RUN: %clang -march=corei7 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M64 +// RUN: %clang -march=nehalem -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_M64 +// RUN: %clang -march=westmere -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefixes=CHECK_COREI7_M64,CHECK_WESTMERE_M64 +// CHECK_COREI7_M64: #define __CRC32__ 1 // CHECK_COREI7_M64: #define __MMX__ 1 +// CHECK_WESTMERE_M64: #define __PCLMUL__ 1 // CHECK_COREI7_M64: #define __POPCNT__ 1 // CHECK_COREI7_M64: #define __SSE2_MATH__ 1 // CHECK_COREI7_M64: #define __SSE2__ 1 @@ -437,6 +461,9 @@ // RUN: %clang -march=corei7-avx -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M32 +// RUN: %clang -march=sandybridge -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M32 // CHECK_COREI7_AVX_M32: #define __AVX__ 1 // CHECK_COREI7_AVX_M32: #define __MMX__ 1 // CHECK_COREI7_AVX_M32: #define __PCLMUL__ 1 @@ -460,6 +487,9 @@ // RUN: %clang -march=corei7-avx -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M64 +// RUN: %clang -march=sandybridge -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_COREI7_AVX_M64 // CHECK_COREI7_AVX_M64: #define __AVX__ 1 // CHECK_COREI7_AVX_M64: #define __MMX__ 1 // CHECK_COREI7_AVX_M64: #define __PCLMUL__ 1 @@ -486,6 +516,9 @@ // RUN: %clang -march=core-avx-i -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M32 +// RUN: %clang -march=ivybridge -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M32 // CHECK_CORE_AVX_I_M32: #define __AVX__ 1 // CHECK_CORE_AVX_I_M32: #define __F16C__ 1 // CHECK_CORE_AVX_I_M32: #define __MMX__ 1 @@ -509,6 +542,9 @@ // RUN: %clang -march=core-avx-i -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M64 +// RUN: %clang -march=ivybridge -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX_I_M64 // CHECK_CORE_AVX_I_M64: #define __AVX__ 1 // CHECK_CORE_AVX_I_M64: #define __F16C__ 1 // CHECK_CORE_AVX_I_M64: #define __MMX__ 1 @@ -535,6 +571,9 @@ // RUN: %clang -march=core-avx2 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M32 +// RUN: %clang -march=haswell -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M32 // CHECK_CORE_AVX2_M32: #define __AVX2__ 1 // CHECK_CORE_AVX2_M32: #define __AVX__ 1 // CHECK_CORE_AVX2_M32: #define __BMI2__ 1 @@ -567,6 +606,9 @@ // RUN: %clang -march=core-avx2 -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M64 +// RUN: %clang -march=haswell -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_CORE_AVX2_M64 // CHECK_CORE_AVX2_M64: #define __AVX2__ 1 // CHECK_CORE_AVX2_M64: #define __AVX__ 1 // CHECK_CORE_AVX2_M64: #define __BMI2__ 1 @@ -2085,6 +2127,9 @@ // RUN: %clang -march=atom -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M32 +// RUN: %clang -march=bonnell -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M32 // CHECK_ATOM_M32: #define __MMX__ 1 // CHECK_ATOM_M32: #define __MOVBE__ 1 // CHECK_ATOM_M32: #define __SSE2__ 1 @@ -2101,6 +2146,9 @@ // RUN: %clang -march=atom -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M64 +// RUN: %clang -march=bonnell -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_ATOM_M64 // CHECK_ATOM_M64: #define __MMX__ 1 // CHECK_ATOM_M64: #define __MOVBE__ 1 // CHECK_ATOM_M64: #define __SSE2_MATH__ 1 @@ -2336,6 +2384,9 @@ // RUN: %clang -march=slm -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M32 +// RUN: %clang -march=silvermont -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M32 // CHECK_SLM_M32: #define __FXSR__ 1 // CHECK_SLM_M32: #define __MMX__ 1 // CHECK_SLM_M32: #define __MOVBE__ 1 @@ -2359,6 +2410,9 @@ // RUN: %clang -march=slm -m64 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M64 +// RUN: %clang -march=silvermont -m64 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SLM_M64 // CHECK_SLM_M64: #define __FXSR__ 1 // CHECK_SLM_M64: #define __MMX__ 1 // CHECK_SLM_M64: #define __MOVBE__ 1