Description
LLIR has a list of special function intrinsics:
‘llvm.sqrt.*’ Intrinsic
‘llvm.powi.*’ Intrinsic
‘llvm.sin.*’ Intrinsic
‘llvm.cos.*’ Intrinsic
‘llvm.tan.*’ Intrinsic
‘llvm.asin.*’ Intrinsic
‘llvm.acos.*’ Intrinsic
‘llvm.atan.*’ Intrinsic
‘llvm.atan2.*’ Intrinsic
‘llvm.sinh.*’ Intrinsic
‘llvm.cosh.*’ Intrinsic
‘llvm.tanh.*’ Intrinsic
‘llvm.pow.*’ Intrinsic
‘llvm.exp.*’ Intrinsic
‘llvm.exp2.*’ Intrinsic
‘llvm.exp10.*’ Intrinsic
‘llvm.log.*’ Intrinsic
‘llvm.log10.*’ Intrinsic
‘llvm.log2.*’ Intrinsic
On the NVPTX backend, all but sqrt
of these functions will throw an error like this:
llvm nvptx error: no libcall available for flog
While the functions can be implemented by nv-specific intrinsics like llvm.nvvm.log.approx.f
on nvptx, implementing these basic-LLVM intrinsic functions could help make frontend code more cross-platform compatible and ease the development process.