diff --git a/clang/lib/Headers/bmi2intrin.h b/clang/lib/Headers/bmi2intrin.h --- a/clang/lib/Headers/bmi2intrin.h +++ b/clang/lib/Headers/bmi2intrin.h @@ -35,14 +35,6 @@ 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 @@ -72,7 +64,17 @@ return (unsigned long long) __res; } -#endif /* __x86_64__ */ +#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__ */ #undef __DEFAULT_FN_ATTRS