[libc-commits] [PATCH] D139064: Onboard signbitf to llvmlibc math functions.

Renyi Chen via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Dec 1 12:19:36 PST 2022


renyichen added a comment.

fputil vs builtin functions.



================
Comment at: libc/spec/stdc.td:467
 
+          FunctionSpec<"signbitf", RetValSpec<BoolType>, [ArgSpec<FloatType>]>,
+
----------------
sivachandra wrote:
> Is `signbitf` really specified by the C standard? For that matter, any standard at all? I think standards only specify a generic `signbit` macro which can be implemented as:
> 
> ```
> #define signbit(x) __builtin_signbit(x)
> ```
I see (I should but didn't check the C standard). I probably should implement this in a separate code change-list.

Thanks for the insight and I have several questions (which does not necessarily make sense =p): do we plan to implement a bunch of functions that rely on __builtin_functions (isnan, isfinite, is_greater etc)? If so, can we rely on the __builtin_functions in terms of existence/correctness/speed of builtin functions given that llvmlibc has its own fputils?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139064/new/

https://reviews.llvm.org/D139064



More information about the libc-commits mailing list