amdgpu: Add workaround for unimplemented llvm.exp intrinsic

Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 317935
This commit is contained in:
Jan Vesely 2017-11-10 22:16:25 +00:00
parent adc1eaedf8
commit 8dc6e98d47
3 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,4 @@
math/native_exp.cl
math/native_log.cl
math/native_log10.cl
math/nextafter.cl

View File

@ -0,0 +1,5 @@
#include <clc/clc.h>
#define __CLC_BODY <native_exp.inc>
#define __FLOAT_ONLY
#include <clc/math/gentype.inc>

View File

@ -0,0 +1,3 @@
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE native_exp(__CLC_GENTYPE val) {
return native_exp2(val * M_LOG2E_F);
}