math: Fix ilogb(double) return type

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 261714
This commit is contained in:
Aaron Watry 2016-02-24 00:52:15 +00:00
parent 0dc3d24d5d
commit 09f3c99a86
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ _CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, int, ilogb, float);
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
_CLC_OVERLOAD _CLC_DEF ilogb(double x) {
_CLC_OVERLOAD _CLC_DEF int ilogb(double x) {
ulong ux = as_ulong(x);
ulong ax = ux & ~SIGNBIT_DP64;
int r = (int) (ax >> EXPSHIFTBITS_DP64) - EXPBIAS_DP64;