diff --git a/clang/lib/Headers/bmi2intrin.h b/clang/lib/Headers/bmi2intrin.h index 0b56aed5f4cb7..0e4dae8b9059a 100644 --- a/clang/lib/Headers/bmi2intrin.h +++ b/clang/lib/Headers/bmi2intrin.h @@ -7,8 +7,8 @@ *===-----------------------------------------------------------------------=== */ -#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H -#error "Never use directly; include instead." +#ifndef __IMMINTRIN_H +#error "Never use directly; include instead." #endif #ifndef __BMI2INTRIN_H @@ -35,6 +35,14 @@ _pext_u32(unsigned int __X, unsigned int __Y) return __builtin_ia32_pext_si(__X, __Y); } +static __inline__ unsigned int __DEFAULT_FN_ATTRS +_mulx_u32(unsigned int __X, unsigned int __Y, unsigned int *__P) +{ + unsigned long long __res = (unsigned long long) __X * __Y; + *__P = (unsigned int)(__res >> 32); + return (unsigned int)__res; +} + #ifdef __x86_64__ static __inline__ unsigned long long __DEFAULT_FN_ATTRS @@ -64,17 +72,7 @@ _mulx_u64 (unsigned long long __X, unsigned long long __Y, return (unsigned long long) __res; } -#else /* !__x86_64__ */ - -static __inline__ unsigned int __DEFAULT_FN_ATTRS -_mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P) -{ - unsigned long long __res = (unsigned long long) __X * __Y; - *__P = (unsigned int) (__res >> 32); - return (unsigned int) __res; -} - -#endif /* !__x86_64__ */ +#endif /* __x86_64__ */ #undef __DEFAULT_FN_ATTRS diff --git a/clang/lib/Headers/clzerointrin.h b/clang/lib/Headers/clzerointrin.h index a180984a3f285..6ed9c5e9d3d75 100644 --- a/clang/lib/Headers/clzerointrin.h +++ b/clang/lib/Headers/clzerointrin.h @@ -6,7 +6,7 @@ * *===-----------------------------------------------------------------------=== */ -#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H +#ifndef __X86INTRIN_H #error "Never use directly; include instead." #endif diff --git a/clang/lib/Headers/rdseedintrin.h b/clang/lib/Headers/rdseedintrin.h index 405bc2451eb86..a1f5d7d55f9f4 100644 --- a/clang/lib/Headers/rdseedintrin.h +++ b/clang/lib/Headers/rdseedintrin.h @@ -7,8 +7,8 @@ *===-----------------------------------------------------------------------=== */ -#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H -#error "Never use directly; include instead." +#ifndef __IMMINTRIN_H +#error "Never use directly; include instead." #endif #ifndef __RDSEEDINTRIN_H