[PATCH] D47029: [X86] Remove some preprocessor feature checks from intrinsic headers

2018-05-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rC332830: [X86] Remove some preprocessor feature checks from 
intrinsic headers (authored by ctopper, committed by ).

Repository:
  rC Clang

https://reviews.llvm.org/D47029

Files:
  lib/Headers/prfchwintrin.h
  lib/Headers/smmintrin.h


Index: lib/Headers/smmintrin.h
===
--- lib/Headers/smmintrin.h
+++ lib/Headers/smmintrin.h
@@ -2458,8 +2458,6 @@
 
 #undef __DEFAULT_FN_ATTRS
 
-#ifdef __POPCNT__
 #include 
-#endif
 
 #endif /* __SMMINTRIN_H */
Index: lib/Headers/prfchwintrin.h
===
--- lib/Headers/prfchwintrin.h
+++ lib/Headers/prfchwintrin.h
@@ -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 @@
 {
   __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
 }
-#endif
 
 #endif /* __PRFCHWINTRIN_H */


Index: lib/Headers/smmintrin.h
===
--- lib/Headers/smmintrin.h
+++ lib/Headers/smmintrin.h
@@ -2458,8 +2458,6 @@
 
 #undef __DEFAULT_FN_ATTRS
 
-#ifdef __POPCNT__
 #include 
-#endif
 
 #endif /* __SMMINTRIN_H */
Index: lib/Headers/prfchwintrin.h
===
--- lib/Headers/prfchwintrin.h
+++ lib/Headers/prfchwintrin.h
@@ -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 @@
 {
   __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
 }
-#endif
 
 #endif /* __PRFCHWINTRIN_H */
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D47029: [X86] Remove some preprocessor feature checks from intrinsic headers

2018-05-20 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision.
echristo added a comment.
This revision is now accepted and ready to land.

LGTM.

-eric


https://reviews.llvm.org/D47029



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D47029: [X86] Remove some preprocessor feature checks from intrinsic headers

2018-05-18 Thread David Kreitzer via Phabricator via cfe-commits
DavidKreitzer added a comment.

Looks right to me, Craig.


https://reviews.llvm.org/D47029



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D47029: [X86] Remove some preprocessor feature checks from intrinsic headers

2018-05-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision.
craig.topper added reviewers: echristo, RKSimon, spatel.

These look to be a couple things that weren't remvoed 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.


https://reviews.llvm.org/D47029

Files:
  lib/Headers/prfchwintrin.h
  lib/Headers/smmintrin.h


Index: lib/Headers/smmintrin.h
===
--- lib/Headers/smmintrin.h
+++ lib/Headers/smmintrin.h
@@ -2458,8 +2458,6 @@
 
 #undef __DEFAULT_FN_ATTRS
 
-#ifdef __POPCNT__
 #include 
-#endif
 
 #endif /* __SMMINTRIN_H */
Index: lib/Headers/prfchwintrin.h
===
--- lib/Headers/prfchwintrin.h
+++ lib/Headers/prfchwintrin.h
@@ -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 @@
 {
   __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
 }
-#endif
 
 #endif /* __PRFCHWINTRIN_H */


Index: lib/Headers/smmintrin.h
===
--- lib/Headers/smmintrin.h
+++ lib/Headers/smmintrin.h
@@ -2458,8 +2458,6 @@
 
 #undef __DEFAULT_FN_ATTRS
 
-#ifdef __POPCNT__
 #include 
-#endif
 
 #endif /* __SMMINTRIN_H */
Index: lib/Headers/prfchwintrin.h
===
--- lib/Headers/prfchwintrin.h
+++ lib/Headers/prfchwintrin.h
@@ -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 @@
 {
   __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
 }
-#endif
 
 #endif /* __PRFCHWINTRIN_H */
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits