[libc-commits] [PATCH] D143116: [libc][math] Implement scalbn, scalbnf, scalbnl.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Feb 2 16:40:50 PST 2023


lntue accepted this revision.
lntue added inline comments.


================
Comment at: libc/src/__support/FPUtil/ManipulationFunctions.h:119-122
+  if (exp == 0)
+    return x;
   FPBits<T> bits(x);
+  if (bits.is_zero() || bits.is_inf_or_nan())
----------------
These are exceptional cases, adding `unlikely` to these 2 conditions could potentially speed up the main cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143116



More information about the libc-commits mailing list