[libc-commits] [libc] [libc][math][c23] add entry points and tests for fsqrt (PR #99669)
via libc-commits
libc-commits at lists.llvm.org
Sat Jul 20 15:20:05 PDT 2024
================
@@ -739,6 +739,10 @@ def StdC : StandardSpec<"stdc"> {
GuardedFunctionSpec<"f16mulf128", RetValSpec<Float16Type>, [ArgSpec<Float128Type>, ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128">,
+ FunctionSpec<"fsqrt", RetValSpec<FloatType>, [ArgSpec<DoubleType>]>,
+ FunctionSpec<"fsqrtl", RetValSpec<FloatType>, [ArgSpec<LongDoubleType>]>,
+ GuardedFunctionSpec<"fsqrtf128", RetValSpec<FloatType>, [ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
----------------
overmighty wrote:
`fsqrtf128` should be an LLVM libc extension, so it should be moved to libc/spec/llvm_libc_ext.td. The C standard only defines these:
```c
float fsqrt(double x);
float fsqrtl(long double x);
_FloatM fMsqrtfN(_FloatN x); // M < N
```
https://github.com/llvm/llvm-project/pull/99669
More information about the libc-commits
mailing list