[libc-commits] [libc] [libc][mathvec][aarch64] Add AdvSIMD optimised expf (PR #206776)

via libc-commits libc-commits at lists.llvm.org
Tue Jul 7 07:23:04 PDT 2026


================
@@ -0,0 +1,120 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains an AdvSIMD architecture optimised single-precision expf.
+///
+//===----------------------------------------------------------------------===//
+
+#include "src/mathvec/expf.h"
+#include "arm_neon.h"
+#include "src/__support/common.h"
+#include "src/__support/mathvec/expf_utils.h"
+#include "src/mathvec/aarch64/common.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+static constexpr struct expf_data {
+  float64x2_t shift, inv_ln2;
+  double ln2_hi, ln2_lo;
+  double c1, c3;
+  float64x2_t c0, c2;
+  float32x4_t range_val;
+  uint32x4_t inf;
+  uint64x2_t idx_mask;
+  const uint64_t *mantissa;
+} expf_data = {
----------------
lntue wrote:

Can we split this into 2, one for the struct type, and one for the constexpr constant.  The constant will need to be all caps.

https://github.com/llvm/llvm-project/pull/206776


More information about the libc-commits mailing list