summaryrefslogtreecommitdiffstats
path: root/libclc
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-07-08 17:26:33 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-07-08 17:26:33 +0000
commita4cadba551a9ccc36c82a3f3884fc4d60514fac5 (patch)
tree38c293455bffaaa70de18c0f555935e80c82cc26 /libclc
parent9060bdb64976065fa40067dfa53b6d2ec2946b50 (diff)
downloadbcm5719-llvm-a4cadba551a9ccc36c82a3f3884fc4d60514fac5.tar.gz
bcm5719-llvm-a4cadba551a9ccc36c82a3f3884fc4d60514fac5.zip
Add bitselect() builtin
Reviewed-By: Aaron Watry <awatry@gmail.com> llvm-svn: 185836
Diffstat (limited to 'libclc')
-rw-r--r--libclc/generic/include/clc/clc.h1
-rw-r--r--libclc/generic/include/clc/relational/bitselect.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clc.h b/libclc/generic/include/clc/clc.h
index 10d30e032fa..1ce97ade87f 100644
--- a/libclc/generic/include/clc/clc.h
+++ b/libclc/generic/include/clc/clc.h
@@ -82,6 +82,7 @@
/* 6.11.6 Relational Functions */
#include <clc/relational/any.h>
+#include <clc/relational/bitselect.h>
#include <clc/relational/select.h>
/* 6.11.8 Synchronization Functions */
diff --git a/libclc/generic/include/clc/relational/bitselect.h b/libclc/generic/include/clc/relational/bitselect.h
new file mode 100644
index 00000000000..e91cbfded8b
--- /dev/null
+++ b/libclc/generic/include/clc/relational/bitselect.h
@@ -0,0 +1 @@
+#define bitselect(x, y, z) ((x) ^ ((z) & ((y) ^ (x))))
OpenPOWER on IntegriCloud