mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-06 17:41:22 +00:00
amdgpu/math: Don't use llvm instrinsic for native_log
AMDGPU targets don't have insturction for it, so it'll be expanded to C * log2 anyway. v2: use native_log2 instead of the more precise sw implementation v3: move to amdgpu v4: drop old AMD copyright Reviewer: Aaron Watry Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 316587
This commit is contained in:
parent
538612c885
commit
9fedbb9d8e
libclc/amdgpu/lib
@ -1,2 +1,3 @@
|
||||
math/native_log.cl
|
||||
math/nextafter.cl
|
||||
math/sqrt.cl
|
||||
|
5
libclc/amdgpu/lib/math/native_log.cl
Normal file
5
libclc/amdgpu/lib/math/native_log.cl
Normal file
@ -0,0 +1,5 @@
|
||||
#include <clc/clc.h>
|
||||
|
||||
#define __CLC_BODY <native_log.inc>
|
||||
#define __FLOAT_ONLY
|
||||
#include <clc/math/gentype.inc>
|
3
libclc/amdgpu/lib/math/native_log.inc
Normal file
3
libclc/amdgpu/lib/math/native_log.inc
Normal file
@ -0,0 +1,3 @@
|
||||
_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE native_log(__CLC_GENTYPE val) {
|
||||
return native_log2(val) * (1.0f / M_LOG2E_F);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user