]> granicus.if.org Git - clang/commitdiff
[X86] Remove some preprocessor feature checks from intrinsic headers
authorCraig Topper <craig.topper@intel.com>
Mon, 21 May 2018 06:07:49 +0000 (06:07 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 21 May 2018 06:07:49 +0000 (06:07 +0000)
Summary:
These look to be a couple things that weren't removed when we switched to target attribute.

The popcnt makes including just smmintrin.h also include popcntintrin.h. The popcnt file itself already contains target attrributes.

The prefetch ones are just wrappers around __builtin_prefetch which we have graceful fallbacks for in the backend if the exact instruction isn't available. So there's no reason to hide them. And it makes them available in functions that have the write target attribute but not a -march command line flag.

Reviewers: echristo, RKSimon, spatel, DavidKreitzer

Reviewed By: echristo

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D47029

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

lib/Headers/prfchwintrin.h
lib/Headers/smmintrin.h

index 95662994b8664124db383e7af1bcc15a698ddbcf..70851396f48e25150279b373d22beb8d468d4b90 100644 (file)
@@ -28,7 +28,6 @@
 #ifndef __PRFCHWINTRIN_H
 #define __PRFCHWINTRIN_H
 
-#if defined(__PRFCHW__) || defined(__3dNOW__)
 /// Loads a memory sequence containing the specified memory address into
 ///    all data cache levels. The cache-coherency state is set to exclusive.
 ///    Data can be read from and written to the cache line without additional
@@ -66,6 +65,5 @@ _m_prefetchw(void *__P)
 {
   __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
 }
-#endif
 
 #endif /* __PRFCHWINTRIN_H */
index b2053bc7362dbcc22a030a5ddb8839ccd375a500..99e50bab6794316212b465a71111b676389e5e89 100644 (file)
@@ -2458,8 +2458,6 @@ _mm_crc32_u64(unsigned long long __C, unsigned long long __D)
 
 #undef __DEFAULT_FN_ATTRS
 
-#ifdef __POPCNT__
 #include <popcntintrin.h>
-#endif
 
 #endif /* __SMMINTRIN_H */