From 09f3c99a867a4ac51823bf36238857e0b3101be8 Mon Sep 17 00:00:00 2001 From: Aaron Watry Date: Wed, 24 Feb 2016 00:52:15 +0000 Subject: math: Fix ilogb(double) return type Signed-off-by: Aaron Watry Reviewed-by: Jan Vesely llvm-svn: 261714 --- libclc/generic/lib/math/ilogb.cl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libclc') diff --git a/libclc/generic/lib/math/ilogb.cl b/libclc/generic/lib/math/ilogb.cl index b783b7e9192..7ab7899e0c5 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; -- cgit v1.2.3