[llvm] [NVPTX] Improve support for {ex2,lg2}.approx (PR #120519)
Princeton Ferro via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 11:10:45 PST 2024
================
@@ -964,6 +964,10 @@ let TargetPrefix = "nvvm" in {
DefaultAttrsIntrinsic<[llvm_half_ty], [llvm_half_ty], [IntrNoMem]>;
def int_nvvm_ex2_approx_f16x2 :
DefaultAttrsIntrinsic<[llvm_v2f16_ty], [llvm_v2f16_ty], [IntrNoMem]>;
+ def int_nvvm_ex2_approx_bf16 :
+ DefaultAttrsIntrinsic<[llvm_bfloat_ty], [llvm_bfloat_ty], [IntrNoMem]>;
+ def int_nvvm_ex2_approx_bf16x2 :
+ DefaultAttrsIntrinsic<[llvm_v2bf16_ty], [llvm_v2bf16_ty], [IntrNoMem]>;
----------------
Prince781 wrote:
They're not different and I think they could be removed, _but_ we have internal code that relies on them.
I can avoid adding the `bf16` variants then so it'll encourage people to switch to using `llvm.exp2` going forward.
https://github.com/llvm/llvm-project/pull/120519
More information about the llvm-commits
mailing list