-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR47686. These micro-architecture levels are defined in the x86-64 psABI: https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9 GCC 11 will support these levels. Note, -mtune=x86-64-v[234] are invalid and __builtin_cpu_is cannot be used on them. Reviewed By: craig.topper, RKSimon Differential Revision: https://reviews.llvm.org/D89197
- Loading branch information
Showing
16 changed files
with
182 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// RUN: %clang -target x86_64 -march=x86-64 -E -dM %s > %tv1 | ||
// RUN: FileCheck %s --check-prefix=X86_64_V1 < %tv1 | ||
|
||
// X86_64_V1: #define __MMX__ 1 | ||
// X86_64_V1: #define __SSE2_MATH__ 1 | ||
// X86_64_V1: #define __SSE2__ 1 | ||
// X86_64_V1: #define __SSE_MATH__ 1 | ||
// X86_64_V1: #define __SSE__ 1 | ||
// X86_64_V1: #define __amd64 1 | ||
// X86_64_V1: #define __amd64__ 1 | ||
// X86_64_V1: #define __k8 1 | ||
// X86_64_V1: #define __k8__ 1 | ||
// X86_64_V1: #define __x86_64 1 | ||
// X86_64_V1: #define __x86_64__ 1 | ||
|
||
// RUN: %clang -target x86_64 -march=x86-64-v2 -E -dM %s > %tv2 | ||
// RUN: diff %tv1 %tv2 > %t.txt || true | ||
// RUN: FileCheck %s --check-prefix=X86_64_V2 < %t.txt | ||
|
||
/// v2 is close to Nehalem. | ||
// X86_64_V2: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1 | ||
// X86_64_V2: #define __LAHF_SAHF__ 1 | ||
// X86_64_V2: #define __POPCNT__ 1 | ||
// X86_64_V2: #define __SSE3__ 1 | ||
// X86_64_V2-NEXT: #define __SSE4_1__ 1 | ||
// X86_64_V2-NEXT: #define __SSE4_2__ 1 | ||
// X86_64_V2: #define __SSSE3__ 1 | ||
|
||
/// v3 is close to Haswell. | ||
// RUN: %clang -target x86_64 -march=x86-64-v3 -E -dM %s > %tv3 | ||
// RUN: diff %tv2 %tv3 > %t.txt || true | ||
// RUN: FileCheck %s --check-prefix=X86_64_V3 < %t.txt | ||
|
||
// X86_64_V3: #define __AVX2__ 1 | ||
// X86_64_V3-NEXT: #define __AVX__ 1 | ||
// X86_64_V3: #define __BMI2__ 1 | ||
// X86_64_V3-NEXT: #define __BMI__ 1 | ||
// X86_64_V3: #define __F16C__ 1 | ||
// X86_64_V3: #define __FMA__ 1 | ||
// X86_64_V3: #define __LZCNT__ 1 | ||
// X86_64_V3: #define __MOVBE__ 1 | ||
// X86_64_V3: #define __XSAVE__ 1 | ||
|
||
/// v4 is close to the AVX-512 level implemented by Xeon Scalable Processors. | ||
// RUN: %clang -target x86_64 -march=x86-64-v4 -E -dM %s > %tv4 | ||
// RUN: diff %tv3 %tv4 > %t.txt || true | ||
// RUN: FileCheck %s --check-prefix=X86_64_V4 < %t.txt | ||
|
||
// X86_64_V4: #define __AVX512BW__ 1 | ||
// X86_64_V4-NEXT: #define __AVX512CD__ 1 | ||
// X86_64_V4-NEXT: #define __AVX512DQ__ 1 | ||
// X86_64_V4-NEXT: #define __AVX512F__ 1 | ||
// X86_64_V4-NEXT: #define __AVX512VL__ 1 | ||
// X86_64_V4-NOT: #define __AVX512{{.*}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.