]> granicus.if.org Git - clang/commitdiff
[X86] Move all Intel defined intrinsic includes into immintrin.h
authorCraig Topper <craig.topper@intel.com>
Wed, 23 May 2018 18:32:58 +0000 (18:32 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 23 May 2018 18:32:58 +0000 (18:32 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333110 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/cldemoteintrin.h
lib/Headers/clzerointrin.h
lib/Headers/immintrin.h
lib/Headers/movdirintrin.h
lib/Headers/pconfigintrin.h
lib/Headers/ptwriteintrin.h
lib/Headers/rdseedintrin.h
lib/Headers/sgxintrin.h
lib/Headers/waitpkgintrin.h
lib/Headers/wbnoinvdintrin.h
lib/Headers/x86intrin.h

index 1b54dd43b3adb2843b985d048979a97143050855..fa78148ebf02930e1c14f54f953255346ee22bf7 100644 (file)
@@ -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
 
index 9fb16100901dc5921d370f03b34ff2dda7b145bc..07628acd800542e71739f409da050c27779812b6 100644 (file)
@@ -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
 
index e5127181bec3f6056875706d95d04e61a4def6e5..6d3407f74349a51f936b6b610958655886bd77fe 100644 (file)
 #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 */
index 10322e17e4021bd0e556871a75a48e97d6c6ab0d..ba0978f46cae5c0911b45502c676b07b61a95b3e 100644 (file)
@@ -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
 
index 6267ec1f9da90d2b841aab1a72a3f478c88d4501..fee3cad38854d9b854248989df659ad31fcdb54e 100644 (file)
@@ -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
 
index 4dacf1743f47ae322c2e44eca8c7b7fdeec10138..1bb1df0a2edfd9c911ad47e4ce701f5a618444e8 100644 (file)
@@ -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
 
index 421f4ea48702ca1406af51f8b43a46fb414ec311..419466932cf5645752c20c98d4431b0f50d8a508 100644 (file)
@@ -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
 
index 20694f5d37d452190db8e63a00aa03ed5ce1581a..20aee766103c9d6f129b37acd526c1432678b4ce 100644 (file)
@@ -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
 
index 184c4aa462c7e535f8fbe74e47e44bcaf3403ac5..e29d6cfa5a5112458418ce2f253015a0a780fc24 100644 (file)
@@ -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
 
index 0852dc1729f503abf203c152da77025a5e24b0fa..cad83368dbe7dd0d564449c2db506b93cd9d85a9 100644 (file)
@@ -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
 
index afece4c66d4a8e23218f539e7d92c141574fd5c1..ec3e3843646f0684017b3fc2b3d3a055947cc858 100644 (file)
 #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
 #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 */