Issue |
141364
|
Summary |
[NVPTX] Implement LLVM special function intrinsics?
|
Labels |
new issue
|
Assignees |
|
Reporter |
eliphatfs
|
LLIR has a list of special function intrinsics:
[‘llvm.sqrt.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-sqrt-intrinsic)
[‘llvm.powi.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-powi-intrinsic)
[‘llvm.sin.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-sin-intrinsic)
[‘llvm.cos.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-cos-intrinsic)
[‘llvm.tan.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-tan-intrinsic)
[‘llvm.asin.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-asin-intrinsic)
[‘llvm.acos.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-acos-intrinsic)
[‘llvm.atan.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-atan-intrinsic)
[‘llvm.atan2.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-atan2-intrinsic)
[‘llvm.sinh.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-sinh-intrinsic)
[‘llvm.cosh.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-cosh-intrinsic)
[‘llvm.tanh.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-tanh-intrinsic)
[‘llvm.pow.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-pow-intrinsic)
[‘llvm.exp.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-exp-intrinsic)
[‘llvm.exp2.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-exp2-intrinsic)
[‘llvm.exp10.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-exp10-intrinsic)
[‘llvm.log.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-log-intrinsic)
[‘llvm.log10.*’ Intrinsic](https://llvm.org/docs/LangRef.html#llvm-log10-intrinsic)
[‘llvm.log2.*’ Intrinsic](https://llvm.org/docs/LangRef.html#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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs