Fix isnan definition for vector results
authorAaron Watry <awatry@gmail.com>
Thu, 17 Jul 2014 22:05:22 +0000 (22:05 +0000)
committerAaron Watry <awatry@gmail.com>
Thu, 17 Jul 2014 22:05:22 +0000 (22:05 +0000)
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@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 213316

libclc/generic/lib/relational/isnan.cl

index ab5d58a..f82dc5d 100644 (file)
@@ -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 x) {
   return __builtin_isnan(x);
 }
 
-_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, long, isnan, double)
+_CLC_DEFINE_RELATIONAL_UNARY_VEC_ALL(long, isnan, double)
 
 #endif