[libclc] r356018 - trunc: Remove llvm intrinsic from the header.
Jan Vesely via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 00:06:11 PDT 2019
Author: jvesely
Date: Wed Mar 13 00:06:10 2019
New Revision: 356018
URL: http://llvm.org/viewvc/llvm-project?rev=356018&view=rev
Log:
trunc: Remove llvm intrinsic from the header.
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Added:
libclc/trunk/generic/lib/math/trunc.cl
- copied, changed from r356017, libclc/trunk/generic/include/clc/math/trunc.h
Modified:
libclc/trunk/generic/include/clc/math/trunc.h
libclc/trunk/generic/lib/SOURCES
Modified: libclc/trunk/generic/include/clc/math/trunc.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/math/trunc.h?rev=356018&r1=356017&r2=356018&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/math/trunc.h (original)
+++ libclc/trunk/generic/include/clc/math/trunc.h Wed Mar 13 00:06:10 2019
@@ -1,9 +1,7 @@
-#undef trunc
-#define trunc __clc_trunc
+#define __CLC_BODY <clc/math/unary_decl.inc>
+#define __CLC_FUNCTION trunc
-#define __CLC_FUNCTION __clc_trunc
-#define __CLC_INTRINSIC "llvm.trunc"
-#include <clc/math/unary_intrin.inc>
+#include <clc/math/gentype.inc>
+#undef __CLC_BODY
#undef __CLC_FUNCTION
-#undef __CLC_INTRINSIC
Modified: libclc/trunk/generic/lib/SOURCES
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/SOURCES?rev=356018&r1=356017&r2=356018&view=diff
==============================================================================
--- libclc/trunk/generic/lib/SOURCES (original)
+++ libclc/trunk/generic/lib/SOURCES Wed Mar 13 00:06:10 2019
@@ -189,6 +189,7 @@ math/tanh.cl
math/clc_tanpi.cl
math/tanpi.cl
math/tgamma.cl
+math/trunc.cl
misc/shuffle.cl
misc/shuffle2.cl
relational/all.cl
Copied: libclc/trunk/generic/lib/math/trunc.cl (from r356017, libclc/trunk/generic/include/clc/math/trunc.h)
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/math/trunc.cl?p2=libclc/trunk/generic/lib/math/trunc.cl&p1=libclc/trunk/generic/include/clc/math/trunc.h&r1=356017&r2=356018&rev=356018&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/math/trunc.h (original)
+++ libclc/trunk/generic/lib/math/trunc.cl Wed Mar 13 00:06:10 2019
@@ -1,9 +1,10 @@
-#undef trunc
-#define trunc __clc_trunc
+#include <clc/clc.h>
+// Map the llvm intrinsic to an OpenCL function.
#define __CLC_FUNCTION __clc_trunc
#define __CLC_INTRINSIC "llvm.trunc"
#include <clc/math/unary_intrin.inc>
#undef __CLC_FUNCTION
-#undef __CLC_INTRINSIC
+#define __CLC_FUNCTION trunc
+#include "unary_builtin.inc"
More information about the cfe-commits
mailing list