diff options
author | Eric Christopher <echristo@gmail.com> | 2015-06-17 07:09:32 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-06-17 07:09:32 +0000 |
commit | 41885d36e85ead75a1d18ef7d2f43663f90ed67e (patch) | |
tree | 62fec5272b6580d33447211584b973236c020d3a /lib/Headers/fma4intrin.h | |
parent | 695aff12b29828c77c34e1b29d37900d26ea860e (diff) |
Update the intel intrinsic headers to use the target attribute support.
This involved removing the conditional inclusion and replacing them
with target attributes matching the original conditional inclusion
and checks. The testcase update removes the macro checks for each
file and replaces them with usage of the __target__ attribute, e.g.:
int __attribute__((__target__(("sse3")))) foo(int a) {
_mm_mwait(0, 0);
return 4;
}
This usage does require the enclosing function have the requisite
__target__ attribute for inlining and code generation - also for
any macro intrinsic uses in the enclosing function. There's no change
for existing uses of the intrinsic headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Headers/fma4intrin.h')
-rw-r--r-- | lib/Headers/fma4intrin.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Headers/fma4intrin.h b/lib/Headers/fma4intrin.h index 907907a9eb..5268805605 100644 --- a/lib/Headers/fma4intrin.h +++ b/lib/Headers/fma4intrin.h @@ -28,14 +28,10 @@ #ifndef __FMA4INTRIN_H #define __FMA4INTRIN_H -#ifndef __FMA4__ -# error "FMA4 instruction set is not enabled" -#else - #include <pmmintrin.h> /* Define the default attributes for the functions in this file. */ -#define DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) +#define DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("fma4"))) static __inline__ __m128 DEFAULT_FN_ATTRS _mm_macc_ps(__m128 __A, __m128 __B, __m128 __C) @@ -231,6 +227,4 @@ _mm256_msubadd_pd(__m256d __A, __m256d __B, __m256d __C) #undef DEFAULT_FN_ATTRS -#endif /* __FMA4__ */ - #endif /* __FMA4INTRIN_H */ |