summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-07-23 15:16:21 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-07-23 15:16:21 +0000
commit903a78b7c6674c7af6d80c18af0f86377216bd3d (patch)
treebc3574a16727077042df7ea33ca55fdd52f562dc /libclc/generic/include/clc
parentc0ab2f81e3ab5c7a4c2e0b812a873c3a7f9dca8b (diff)
downloadbcm5719-llvm-903a78b7c6674c7af6d80c18af0f86377216bd3d.tar.gz
bcm5719-llvm-903a78b7c6674c7af6d80c18af0f86377216bd3d.zip
Implement sin builtin for float types
This double version still uses @llvm.sin. llvm-svn: 213762
Diffstat (limited to 'libclc/generic/include/clc')
-rw-r--r--libclc/generic/include/clc/math/sin.h9
-rw-r--r--libclc/generic/include/clc/math/sin.inc1
2 files changed, 4 insertions, 6 deletions
diff --git a/libclc/generic/include/clc/math/sin.h b/libclc/generic/include/clc/math/sin.h
index e50b71a1a6f..6d4cf5a3142 100644
--- a/libclc/generic/include/clc/math/sin.h
+++ b/libclc/generic/include/clc/math/sin.h
@@ -1,6 +1,3 @@
-#undef sin
-#define sin __clc_sin
-
-#define __CLC_FUNCTION __clc_sin
-#define __CLC_INTRINSIC "llvm.sin"
-#include <clc/math/unary_intrin.inc>
+#define __CLC_BODY <clc/math/sin.inc>
+#include <clc/math/gentype.inc>
+#undef __CLC_BODY
diff --git a/libclc/generic/include/clc/math/sin.inc b/libclc/generic/include/clc/math/sin.inc
new file mode 100644
index 00000000000..e722fa35273
--- /dev/null
+++ b/libclc/generic/include/clc/math/sin.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE sin(__CLC_GENTYPE a);
OpenPOWER on IntegriCloud