diff options
| author | Zvi Rackover <zvi.rackover@intel.com> | 2017-07-10 07:13:56 +0000 |
|---|---|---|
| committer | Zvi Rackover <zvi.rackover@intel.com> | 2017-07-10 07:13:56 +0000 |
| commit | 064f00061b600db83e2852892349bc9c0ec30c33 (patch) | |
| tree | e787fabb400f96a561b3962cd8af0e0ecf2cd778 /clang/lib | |
| parent | 70b1af592113779a700219ccf1e56b4da69ae3d3 (diff) | |
| download | bcm5719-llvm-064f00061b600db83e2852892349bc9c0ec30c33.tar.gz bcm5719-llvm-064f00061b600db83e2852892349bc9c0ec30c33.zip | |
X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__
Summary:
The _bit_scan_forward and _bit_scan_reverse intrinsics were accidentally
masked under the preprocessor checks that prune intrinsics definitions for the
benefit of faster compile-time on Windows. This patch moves the
definitons out of that region.
Fixes pr33722
Reviewers: craig.topper, aaboud, thakis
Reviewed By: craig.topper
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D35184
llvm-svn: 307524
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Headers/immintrin.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h index e22dd231427..c5f25bfcb5c 100644 --- a/clang/lib/Headers/immintrin.h +++ b/clang/lib/Headers/immintrin.h @@ -212,6 +212,15 @@ _rdrand32_step(unsigned int *__p) return __builtin_ia32_rdrand32_step(__p); } +#ifdef __x86_64__ +static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) +_rdrand64_step(unsigned long long *__p) +{ + return __builtin_ia32_rdrand64_step(__p); +} +#endif +#endif /* __RDRND__ */ + /* __bit_scan_forward */ static __inline__ int __attribute__((__always_inline__, __nodebug__)) _bit_scan_forward(int __A) { @@ -224,15 +233,6 @@ _bit_scan_reverse(int __A) { return 31 - __builtin_clz(__A); } -#ifdef __x86_64__ -static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) -_rdrand64_step(unsigned long long *__p) -{ - return __builtin_ia32_rdrand64_step(__p); -} -#endif -#endif /* __RDRND__ */ - #if !defined(_MSC_VER) || __has_feature(modules) || defined(__FSGSBASE__) #ifdef __x86_64__ static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) |

