aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
diff options
context:
space:
mode:
authorFarzon Lotfi <1802579+farzonl@users.noreply.github.com>2024-07-19 10:18:58 -0400
committerGitHub <noreply@github.com>2024-07-19 10:18:58 -0400
commitdef3944df822687fa04626a6750ccdea156b3870 (patch)
tree185bfb103cdc32ec4eb5c2b6795784018722c482 /llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
parente2f463b5b64a3574e90be7375b2d2c87fa7e92c1 (diff)
downloadllvm-def3944df822687fa04626a6750ccdea156b3870.zip
llvm-def3944df822687fa04626a6750ccdea156b3870.tar.gz
llvm-def3944df822687fa04626a6750ccdea156b3870.tar.bz2
[WebAssembly] Add Support for Arc and Hyperbolic trig llvm intrinsics (#98755)
## Change: - WebAssemblyRuntimeLibcallSignatures.cpp: Expose the RTLIB's for use by WASM - Add trig specific test cases ## History This change is part of an implementation of https://github.com/llvm/llvm-project/issues/87367's investigation on supporting IEEE math operations as intrinsics. Which was discussed in this RFC: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 This change adds wasm lowering cases for `acos`, `asin`, `atan`, `cosh`, `sinh`, and `tanh`. https://github.com/llvm/llvm-project/issues/70079 https://github.com/llvm/llvm-project/issues/70080 https://github.com/llvm/llvm-project/issues/70081 https://github.com/llvm/llvm-project/issues/70083 https://github.com/llvm/llvm-project/issues/70084 https://github.com/llvm/llvm-project/issues/95966 ## Why Web Assembly? From past changes to try and support constraint intrinsics the changes to the trig builtins to emit intrinsics\constraint intrinsics broke the WASM build. This is an attempt to preempt any such build break. - https://github.com/llvm/llvm-project/pull/95082 - https://github.com/llvm/llvm-project/pull/94559#issuecomment-2159923215
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
index e7810e1..ba3ab51 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
@@ -204,6 +204,24 @@ struct RuntimeLibcallSignatureTable {
Table[RTLIB::TAN_F32] = f32_func_f32;
Table[RTLIB::TAN_F64] = f64_func_f64;
Table[RTLIB::TAN_F128] = i64_i64_func_i64_i64;
+ Table[RTLIB::ASIN_F32] = f32_func_f32;
+ Table[RTLIB::ASIN_F64] = f64_func_f64;
+ Table[RTLIB::ASIN_F128] = i64_i64_func_i64_i64;
+ Table[RTLIB::ACOS_F32] = f32_func_f32;
+ Table[RTLIB::ACOS_F64] = f64_func_f64;
+ Table[RTLIB::ACOS_F128] = i64_i64_func_i64_i64;
+ Table[RTLIB::ATAN_F32] = f32_func_f32;
+ Table[RTLIB::ATAN_F64] = f64_func_f64;
+ Table[RTLIB::ATAN_F128] = i64_i64_func_i64_i64;
+ Table[RTLIB::SINH_F32] = f32_func_f32;
+ Table[RTLIB::SINH_F64] = f64_func_f64;
+ Table[RTLIB::SINH_F128] = i64_i64_func_i64_i64;
+ Table[RTLIB::COSH_F32] = f32_func_f32;
+ Table[RTLIB::COSH_F64] = f64_func_f64;
+ Table[RTLIB::COSH_F128] = i64_i64_func_i64_i64;
+ Table[RTLIB::TANH_F32] = f32_func_f32;
+ Table[RTLIB::TANH_F64] = f64_func_f64;
+ Table[RTLIB::TANH_F128] = i64_i64_func_i64_i64;
Table[RTLIB::SINCOS_F32] = func_f32_iPTR_iPTR;
Table[RTLIB::SINCOS_F64] = func_f64_iPTR_iPTR;
Table[RTLIB::SINCOS_F128] = func_i64_i64_iPTR_iPTR;