llvm-project
be580695 - [LLVM][NVPTX] Upstream tanh intrinsic for libdevice (#149596)

Commit
146 days ago
[LLVM][NVPTX] Upstream tanh intrinsic for libdevice (#149596) Currently __nv_fast_tanhf() in libdevice maps to an nvvm intrinsic that has not been upstreamed, which is causing issues when using the NVPTX backend from upstream. Instead of upstreaming the intrinsic, we can instead use the existing Intrinsic::tanh with the afn flag. This change adds NVPTX backend support for ISD::TANH, adds auto-upgrade for the old tanh_approx intrinsic to @llvm.tanh.f32 with afn flag so that libdevice works properly upstream, and adds a basic codegen test and a case to the auto-upgrade test.
Author
Parents
Loading