[PATCH] D49514: [compiler-rt] [builtins] Add logb/logbf/logbl methods to compiler-rt to avoid libm dependencies when possible.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 23 14:22:01 PDT 2018
efriedma added a comment.
Maybe just make this a static inline function in fp_lib.h?
Maybe worth implementing something like ilogb instead, to avoid an extra int->float->int conversion? I guess it's not that important.
> Fixes PR32279 and PR28652.
Is this really enough to fix PR32279? That report mentions some other symbols (scalbn*, fmaxl).
================
Comment at: lib/builtins/ppc/divtc3.c:26
int ilogbw = 0;
- const double logbw = crt_logb(crt_fmax(crt_fabs(cDD.s.hi), crt_fabs(dDD.s.hi) ));
-
- if (crt_isfinite(logbw))
+ const double logbw = __compiler_rt_logbl(
+ crt_fmax(crt_fabs(cDD.s.hi), crt_fabs(dDD.s.hi)));
----------------
This is wrong. The original code is calling logb, not logbl.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D49514
More information about the llvm-commits
mailing list