[libclc] r213316 - Fix isnan definition for vector results
Aaron Watry
awatry at gmail.com
Thu Jul 17 15:05:22 PDT 2014
Author: awatry
Date: Thu Jul 17 17:05:22 2014
New Revision: 213316
URL: http://llvm.org/viewvc/llvm-project?rev=213316&view=rev
Log:
Fix isnan definition for vector results
Vector true is -1, not 1, which means we need to use the relational unary
macro instead of the normal unary builtin one.
Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Modified:
libclc/trunk/generic/lib/relational/isnan.cl
Modified: libclc/trunk/generic/lib/relational/isnan.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/relational/isnan.cl?rev=213316&r1=213315&r2=213316&view=diff
==============================================================================
--- libclc/trunk/generic/lib/relational/isnan.cl (original)
+++ libclc/trunk/generic/lib/relational/isnan.cl Thu Jul 17 17:05:22 2014
@@ -1,7 +1,7 @@
#include <clc/clc.h>
-#include "../clcmacro.h"
+#include "relational.h"
-_CLC_DEFINE_UNARY_BUILTIN(int, isnan, __builtin_isnan, float)
+_CLC_DEFINE_RELATIONAL_UNARY(int, isnan, __builtin_isnan, float)
#ifdef cl_khr_fp64
@@ -13,6 +13,6 @@ _CLC_DEF _CLC_OVERLOAD int isnan(double
return __builtin_isnan(x);
}
-_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, long, isnan, double)
+_CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL(long, isnan, double)
#endif
More information about the cfe-commits
mailing list