commit 17fbbe5119e5d356d2df5b72fa04abbd2c1f5b3b
Author: Simon Richter <Simon.Richter@hogyros.de>
Date:   Mon Apr 22 18:19:07 2013 +0200

    Add missing select() overloads
    
    Both signed and unsigned types are allowed as the condition type,
    regardless of the true/false branch types.

Index: beignet-0.1+git20130422+003fac5/backend/src/ocl_stdlib.h
===================================================================
--- beignet-0.1+git20130422+003fac5.orig/backend/src/ocl_stdlib.h	2013-04-22 12:04:32.000000000 +0200
+++ beignet-0.1+git20130422+003fac5/backend/src/ocl_stdlib.h	2013-04-22 18:25:49.509225930 +0200
@@ -438,15 +438,24 @@
   return a*b+c;
 }
 
+INLINE OVERLOADABLE uint select(uint src0, uint src1, int cond) {
+  return cond ? src1 : src0;
+}
 INLINE OVERLOADABLE uint select(uint src0, uint src1, uint cond) {
   return cond ? src1 : src0;
 }
 INLINE OVERLOADABLE int select(int src0, int src1, int cond) {
   return cond ? src1 : src0;
 }
+INLINE OVERLOADABLE int select(int src0, int src1, uint cond) {
+  return cond ? src1 : src0;
+}
 INLINE OVERLOADABLE float select(float src0, float src1, int cond) {
   return cond ? src1 : src0;
 }
+INLINE OVERLOADABLE float select(float src0, float src1, uint cond) {
+  return cond ? src1 : src0;
+}
 
 // This will be optimized out by LLVM and will output LLVM select instructions
 #define DECL_SELECT4(TYPE4, TYPE, COND_TYPE4, MASK) \
@@ -467,7 +476,9 @@
   return dst; \
 }
 DECL_SELECT4(int4, int, int4, 0x80000000)
+DECL_SELECT4(int4, int, uint4, 0x80000000)
 DECL_SELECT4(float4, float, int4, 0x80000000)
+DECL_SELECT4(float4, float, uint4, 0x80000000)
 #undef DECL_SELECT4
 
 /////////////////////////////////////////////////////////////////////////////
