[libc-commits] [libc] [libc][mathvec] Initial commit for LIBC vector math component (PR #173058)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Feb 18 09:26:09 PST 2026
================
@@ -9,28 +9,28 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MATHVEC_EXPF_H
#define LLVM_LIBC_SRC___SUPPORT_MATHVEC_EXPF_H
+#include "expf_utils.h"
#include "src/__support/CPP/simd.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/common.h"
-#include "src/__support/mathvec/expf_utils.h"
namespace LIBC_NAMESPACE_DECL {
namespace mathvec {
template <size_t N>
-LIBC_INLINE static cpp::simd<double, N> inline_exp(cpp::simd<double, N> x) {
- static constexpr cpp::simd<double, N> shift = 0x1.800000000ffc0p+46;
+LIBC_INLINE cpp::simd<double, N> inline_exp(cpp::simd<double, N> x) {
----------------
jhuber6 wrote:
Static on the function needs to stay, here and exp_lookup. Consider the case where we are computing a float, which turns into a double vector of size 4 for this lookup. A double vector of size 4 is an AVX register ABI on avx2 but two SSE registers in sse4_2. They both have the same mangled name, what happens when we start compiling this multiple times?
https://github.com/llvm/llvm-project/pull/173058
More information about the libc-commits
mailing list