fabs: Remove llvm intrinsic from the header.

Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 356014
This commit is contained in:
Jan Vesely 2019-03-13 07:06:00 +00:00
parent 54eb4d3a6d
commit fda15e56a6
3 changed files with 18 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#undef fabs
#define fabs __clc_fabs
#define __CLC_BODY <clc/math/unary_decl.inc>
#define __CLC_FUNCTION fabs
#define __CLC_FUNCTION __clc_fabs
#define __CLC_INTRINSIC "llvm.fabs"
#include <clc/math/unary_intrin.inc>
#include <clc/math/gentype.inc>
#undef __CLC_BODY
#undef __CLC_FUNCTION

View File

@ -103,6 +103,7 @@ math/expm1.cl
math/exp2.cl
math/clc_exp10.cl
math/exp10.cl
math/fabs.cl
math/fdim.cl
math/clc_fma.cl
math/fma.cl

View File

@ -0,0 +1,11 @@
#include <clc/clc.h>
#include "../clcmacro.h"
// Map the llvm intrinsic to an OpenCL function.
#define __CLC_FUNCTION __clc_fabs
#define __CLC_INTRINSIC "llvm.fabs"
#include <clc/math/unary_intrin.inc>
#undef __CLC_FUNCTION
#define __CLC_FUNCTION fabs
#include "unary_builtin.inc"