[PATCH] D74259: [WebAssembly] Add cbrt function signatures
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 13 13:20:35 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe252293d0629: [WebAssembly] Add cbrt function signatures (authored by tlively).
Changed prior to commit:
https://reviews.llvm.org/D74259?vs=243294&id=244524#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74259/new/
https://reviews.llvm.org/D74259
Files:
llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
llvm/test/CodeGen/WebAssembly/libcalls.ll
Index: llvm/test/CodeGen/WebAssembly/libcalls.ll
===================================================================
--- llvm/test/CodeGen/WebAssembly/libcalls.ll
+++ llvm/test/CodeGen/WebAssembly/libcalls.ll
@@ -73,9 +73,11 @@
%e = call double @llvm.log.f64(double %d)
; CHECK: f64.call $push{{[0-9]}}=, exp
%f = call double @llvm.exp.f64(double %e)
+ ; CHECK: f64.call $push{{[0-9]}}=, cbrt
+ %g = call fast double @llvm.pow.f64(double %f, double 0x3FD5555555555555)
; CHECK: i32.call $push{{[0-9]}}=, lround
- %g = call i32 @llvm.lround(double %f)
- ret i32 %g
+ %h = call i32 @llvm.lround(double %g)
+ ret i32 %h
}
; fcmp ord and unord (RTLIB::O_F32 / RTLIB::UO_F32 etc) are a special case (see
Index: llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
@@ -178,6 +178,9 @@
Table[RTLIB::SQRT_F32] = f32_func_f32;
Table[RTLIB::SQRT_F64] = f64_func_f64;
Table[RTLIB::SQRT_F128] = func_iPTR_i64_i64;
+ Table[RTLIB::CBRT_F32] = f32_func_f32;
+ Table[RTLIB::CBRT_F64] = f64_func_f64;
+ Table[RTLIB::CBRT_F128] = func_iPTR_i64_i64;
Table[RTLIB::LOG_F32] = f32_func_f32;
Table[RTLIB::LOG_F64] = f64_func_f64;
Table[RTLIB::LOG_F128] = func_iPTR_i64_i64;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74259.244524.patch
Type: text/x-patch
Size: 1429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200213/dcfe2a79/attachment.bin>
More information about the llvm-commits
mailing list