From: Aaron Watry Date: Wed, 24 Feb 2016 00:52:15 +0000 (+0000) Subject: math: Fix ilogb(double) return type X-Git-Tag: llvmorg-3.9.0-rc1~13397 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09f3c99a867a4ac51823bf36238857e0b3101be8;p=platform%2Fupstream%2Fllvm.git math: Fix ilogb(double) return type Signed-off-by: Aaron Watry Reviewed-by: Jan Vesely llvm-svn: 261714 --- diff --git a/libclc/generic/lib/math/ilogb.cl b/libclc/generic/lib/math/ilogb.cl index b783b7e..7ab7899 100644 --- a/libclc/generic/lib/math/ilogb.cl +++ b/libclc/generic/lib/math/ilogb.cl @@ -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;