diff options
author | Craig Topper <craig.topper@intel.com> | 2018-05-23 18:32:58 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-05-23 18:32:58 +0000 |
commit | 664af9bc345e1c34f03f6bf95931d98e0f8d87bd (patch) | |
tree | 86569a1cc2ec6393e191baaa0842a8fd9808b128 | |
parent | 08c630457aaa0fcb677232c4f6b38e82c1d37ba4 (diff) | |
download | bcm5719-llvm-664af9bc345e1c34f03f6bf95931d98e0f8d87bd.tar.gz bcm5719-llvm-664af9bc345e1c34f03f6bf95931d98e0f8d87bd.zip |
[X86] Move all Intel defined intrinsic includes into immintrin.h
This matches the Intel documentation which shows them available by importing immintrin.h. x86intrin.h also includes immintrin.h so anyone including x86intrin.h will still get them.
This is different than gcc, but I don't think we were a perfect match there already. I'm unclear what gcc's policy is about how they choose which to add things to.
Differential Revision: https://reviews.llvm.org/D47182
llvm-svn: 333110
-rw-r--r-- | clang/lib/Headers/cldemoteintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/clzerointrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/immintrin.h | 41 | ||||
-rw-r--r-- | clang/lib/Headers/movdirintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/pconfigintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/ptwriteintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/rdseedintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/sgxintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/waitpkgintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/wbnoinvdintrin.h | 2 | ||||
-rw-r--r-- | clang/lib/Headers/x86intrin.h | 57 |
11 files changed, 50 insertions, 66 deletions
diff --git a/clang/lib/Headers/cldemoteintrin.h b/clang/lib/Headers/cldemoteintrin.h index 1b54dd43b3a..fa78148ebf0 100644 --- a/clang/lib/Headers/cldemoteintrin.h +++ b/clang/lib/Headers/cldemoteintrin.h @@ -21,7 +21,7 @@ *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <cldemoteintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/clzerointrin.h b/clang/lib/Headers/clzerointrin.h index 9fb16100901..07628acd800 100644 --- a/clang/lib/Headers/clzerointrin.h +++ b/clang/lib/Headers/clzerointrin.h @@ -20,7 +20,7 @@ * *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <clzerointrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h index e5127181bec..6d3407f7434 100644 --- a/clang/lib/Headers/immintrin.h +++ b/clang/lib/Headers/immintrin.h @@ -90,6 +90,10 @@ #include <lzcntintrin.h> #endif +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__POPCNT__) +#include <popcntintrin.h> +#endif + #if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA__) #include <fmaintrin.h> #endif @@ -339,4 +343,41 @@ _writegsbase_u64(unsigned long long __V) * whereas others are also available at all times. */ #include <adxintrin.h> +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDSEED__) +#include <rdseedintrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__) +#include <clzerointrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WBNOINVD__) +#include <wbnoinvdintrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLDEMOTE__) +#include <cldemoteintrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WAITPKG__) +#include <waitpkgintrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || \ + defined(__MOVDIRI__) || defined(__MOVDIR64B__) +#include <movdirintrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PCONFIG__) +#include <pconfigintrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SGX__) +#include <sgxintrin.h> +#endif + +#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PTWRITE__) +#include <ptwriteintrin.h> +#endif + #endif /* __IMMINTRIN_H */ diff --git a/clang/lib/Headers/movdirintrin.h b/clang/lib/Headers/movdirintrin.h index 10322e17e40..ba0978f46ca 100644 --- a/clang/lib/Headers/movdirintrin.h +++ b/clang/lib/Headers/movdirintrin.h @@ -20,7 +20,7 @@ * *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <movdirintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/pconfigintrin.h b/clang/lib/Headers/pconfigintrin.h index 6267ec1f9da..fee3cad3885 100644 --- a/clang/lib/Headers/pconfigintrin.h +++ b/clang/lib/Headers/pconfigintrin.h @@ -21,7 +21,7 @@ *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <pconfigintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/ptwriteintrin.h b/clang/lib/Headers/ptwriteintrin.h index 4dacf1743f4..1bb1df0a2ed 100644 --- a/clang/lib/Headers/ptwriteintrin.h +++ b/clang/lib/Headers/ptwriteintrin.h @@ -21,7 +21,7 @@ *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <ptwriteintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/rdseedintrin.h b/clang/lib/Headers/rdseedintrin.h index 421f4ea4870..419466932cf 100644 --- a/clang/lib/Headers/rdseedintrin.h +++ b/clang/lib/Headers/rdseedintrin.h @@ -21,7 +21,7 @@ *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/sgxintrin.h b/clang/lib/Headers/sgxintrin.h index 20694f5d37d..20aee766103 100644 --- a/clang/lib/Headers/sgxintrin.h +++ b/clang/lib/Headers/sgxintrin.h @@ -21,7 +21,7 @@ *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <sgxintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/waitpkgintrin.h b/clang/lib/Headers/waitpkgintrin.h index 184c4aa462c..e29d6cfa5a5 100644 --- a/clang/lib/Headers/waitpkgintrin.h +++ b/clang/lib/Headers/waitpkgintrin.h @@ -20,7 +20,7 @@ * *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <waitpkgintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/wbnoinvdintrin.h b/clang/lib/Headers/wbnoinvdintrin.h index 0852dc1729f..cad83368dbe 100644 --- a/clang/lib/Headers/wbnoinvdintrin.h +++ b/clang/lib/Headers/wbnoinvdintrin.h @@ -21,7 +21,7 @@ *===-----------------------------------------------------------------------=== */ -#ifndef __X86INTRIN_H +#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H #error "Never use <wbnoinvdintrin.h> directly; include <x86intrin.h> instead." #endif diff --git a/clang/lib/Headers/x86intrin.h b/clang/lib/Headers/x86intrin.h index afece4c66d4..ec3e3843646 100644 --- a/clang/lib/Headers/x86intrin.h +++ b/clang/lib/Headers/x86intrin.h @@ -32,26 +32,6 @@ #include <mm3dnow.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__) -#include <bmiintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__) -#include <bmi2intrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LZCNT__) -#include <lzcntintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__POPCNT__) -#include <popcntintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDSEED__) -#include <rdseedintrin.h> -#endif - #if !defined(_MSC_VER) || __has_feature(modules) || defined(__PRFCHW__) #include <prfchwintrin.h> #endif @@ -76,45 +56,8 @@ #include <lwpintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__F16C__) -#include <f16cintrin.h> -#endif - #if !defined(_MSC_VER) || __has_feature(modules) || defined(__MWAITX__) #include <mwaitxintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__) -#include <clzerointrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WBNOINVD__) -#include <wbnoinvdintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLDEMOTE__) -#include <cldemoteintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WAITPKG__) -#include <waitpkgintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || \ - defined(__MOVDIRI__) || defined(__MOVDIR64B__) -#include <movdirintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PCONFIG__) -#include <pconfigintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SGX__) -#include <sgxintrin.h> -#endif - -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PTWRITE__) -#include <ptwriteintrin.h> -#endif - #endif /* __X86INTRIN_H */ |