[libclc] r211733 - relational: Fix signbit

Aaron Watry awatry at gmail.com
Wed Jun 25 14:08:38 PDT 2014


Author: awatry
Date: Wed Jun 25 16:08:38 2014
New Revision: 211733

URL: http://llvm.org/viewvc/llvm-project?rev=211733&view=rev
Log:
relational: Fix signbit

The vector components were mistakenly using () instead of {}, which caused
all but the last vector component to be dropped on the floor.

Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Jeroen Ketema <j.ketema at imperial.ac.uk>

Modified:
    libclc/trunk/generic/lib/relational/signbit.cl

Modified: libclc/trunk/generic/lib/relational/signbit.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/relational/signbit.cl?rev=211733&r1=211732&r2=211733&view=diff
==============================================================================
--- libclc/trunk/generic/lib/relational/signbit.cl (original)
+++ libclc/trunk/generic/lib/relational/signbit.cl Wed Jun 25 16:08:38 2014
@@ -17,35 +17,35 @@ _CLC_DEF _CLC_OVERLOAD RET_TYPE FUNCTION
 
 #define _CLC_DEFINE_RELATIONAL_UNARY_VEC3(RET_TYPE, FUNCTION, ARG_TYPE) \
 _CLC_DEF _CLC_OVERLOAD RET_TYPE FUNCTION(ARG_TYPE x) { \
-  return (RET_TYPE)((FUNCTION(x.s0), FUNCTION(x.s1), FUNCTION(x.s2)) != (RET_TYPE)0); \
+  return (RET_TYPE)( (RET_TYPE){FUNCTION(x.s0), FUNCTION(x.s1), FUNCTION(x.s2)} != (RET_TYPE)0); \
 } \
 
 #define _CLC_DEFINE_RELATIONAL_UNARY_VEC4(RET_TYPE, FUNCTION, ARG_TYPE) \
 _CLC_DEF _CLC_OVERLOAD RET_TYPE FUNCTION(ARG_TYPE x) { \
   return (RET_TYPE)( \
-	( \
+	(RET_TYPE){ \
 		FUNCTION(x.s0), FUNCTION(x.s1), FUNCTION(x.s2), FUNCTION(x.s3) \
-	) != (RET_TYPE)0); \
+	} != (RET_TYPE)0); \
 } \
 
 #define _CLC_DEFINE_RELATIONAL_UNARY_VEC8(RET_TYPE, FUNCTION, ARG_TYPE) \
 _CLC_DEF _CLC_OVERLOAD RET_TYPE FUNCTION(ARG_TYPE x) { \
   return (RET_TYPE)( \
-	( \
+	(RET_TYPE){ \
 		FUNCTION(x.s0), FUNCTION(x.s1), FUNCTION(x.s2), FUNCTION(x.s3), \
 		FUNCTION(x.s4), FUNCTION(x.s5), FUNCTION(x.s6), FUNCTION(x.s7) \
-	) != (RET_TYPE)0); \
+	} != (RET_TYPE)0); \
 } \
 
 #define _CLC_DEFINE_RELATIONAL_UNARY_VEC16(RET_TYPE, FUNCTION, ARG_TYPE) \
 _CLC_DEF _CLC_OVERLOAD RET_TYPE FUNCTION(ARG_TYPE x) { \
   return (RET_TYPE)( \
-	( \
+	(RET_TYPE){ \
 		FUNCTION(x.s0), FUNCTION(x.s1), FUNCTION(x.s2), FUNCTION(x.s3), \
 		FUNCTION(x.s4), FUNCTION(x.s5), FUNCTION(x.s6), FUNCTION(x.s7), \
 		FUNCTION(x.s8), FUNCTION(x.s9), FUNCTION(x.sa), FUNCTION(x.sb), \
 		FUNCTION(x.sc), FUNCTION(x.sd), FUNCTION(x.se), FUNCTION(x.sf) \
-	) != (RET_TYPE)0); \
+	} != (RET_TYPE)0); \
 } \
 
 





More information about the cfe-commits mailing list