math: Enable some math builtins for clang
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 1 Feb 2019 12:39:57 +0000 (10:39 -0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 26 Mar 2019 11:49:47 +0000 (08:49 -0300)
commit4997e8f31e7415652c3dedec672c0e9bf8caa9ca
treec0378709ad1fad1ceed06e6dc976be813319d44b
parent019638910ea1e66c374c8efda0dcb2511f26ae59
math: Enable some math builtins for clang

This patch enable the builtin usage for clang for the C99 functions
fpclassify, isfinite, isnormal, isnan, isinf, and sigbit.  This allows
clang optimize the calls on frontend instead of call the appropriate
glibc symbols.

Checked on aarch64-linux-gnu and x86_64-linux-gnu. I checked the supported
version for each builtin based on released version from clang/llvm.

* math/math.h (fpclassify, isfinite, isnormal, isnan): Use builtin for
clang 2.8.
(signbit): Use builtin for clang 3.3.
(isinf): Use builtin for clang 3.7.
ChangeLog
math/math.h