[libc-commits] [libc] b4c4c79 - [libc][math] Fix missing LIBC_INLINE on exp_range_reduction() function (#103305)
via libc-commits
libc-commits at lists.llvm.org
Tue Aug 13 09:26:40 PDT 2024
Author: OverMighty
Date: 2024-08-13T18:26:36+02:00
New Revision: b4c4c799ab084f0bbd975e724384684b3ee4facb
URL: https://github.com/llvm/llvm-project/commit/b4c4c799ab084f0bbd975e724384684b3ee4facb
DIFF: https://github.com/llvm/llvm-project/commit/b4c4c799ab084f0bbd975e724384684b3ee4facb.diff
LOG: [libc][math] Fix missing LIBC_INLINE on exp_range_reduction() function (#103305)
See Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/73/builds/3669.
Added:
Modified:
libc/src/math/generic/CMakeLists.txt
libc/src/math/generic/expxf16.h
Removed:
################################################################################
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index faa910139fa355..745bd65e1d75b5 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -1367,6 +1367,7 @@ add_entrypoint_object(
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.attributes
libc.src.__support.macros.optimization
COMPILE_OPTIONS
-O3
diff --git a/libc/src/math/generic/expxf16.h b/libc/src/math/generic/expxf16.h
index 53815e0e275533..a0db6cee438e92 100644
--- a/libc/src/math/generic/expxf16.h
+++ b/libc/src/math/generic/expxf16.h
@@ -13,6 +13,7 @@
#include "src/__support/FPUtil/PolyEval.h"
#include "src/__support/FPUtil/multiply_add.h"
#include "src/__support/FPUtil/nearest_integer.h"
+#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
#include <stdint.h>
@@ -45,7 +46,7 @@ struct ExpRangeReduction {
float exp_lo;
};
-ExpRangeReduction exp_range_reduction(float16 x) {
+LIBC_INLINE ExpRangeReduction exp_range_reduction(float16 x) {
// For -18 < x < 12, to compute exp(x), we perform the following range
// reduction: find hi, mid, lo, such that:
// x = hi + mid + lo, in which
More information about the libc-commits
mailing list