[libc-commits] [libc] [llvm] [libc][math] Refactor f16sqrtl to Header Only. (PR #176333)
via libc-commits
libc-commits at lists.llvm.org
Sat Jan 17 05:35:25 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libc/shared/math/f16sqrtl.h libc/src/__support/math/f16sqrtl.h libc/shared/math.h libc/src/math/generic/f16sqrtl.cpp libc/test/shared/shared_math_test.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/shared/math.h b/libc/shared/math.h
index 6cfda9056..e73343401 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -58,12 +58,12 @@
#include "math/expm1.h"
#include "math/expm1f.h"
#include "math/expm1f16.h"
+#include "math/f16sqrtl.h"
#include "math/frexpf.h"
#include "math/frexpf128.h"
#include "math/frexpf16.h"
#include "math/fsqrt.h"
#include "math/fsqrtf128.h"
-#include "math/f16sqrtl.h"
#include "math/hypotf.h"
#include "math/ilogbf16.h"
#include "math/ilogbl.h"
diff --git a/libc/src/__support/math/f16sqrtl.h b/libc/src/__support/math/f16sqrtl.h
index 19c96ec94..a14128b5b 100644
--- a/libc/src/__support/math/f16sqrtl.h
+++ b/libc/src/__support/math/f16sqrtl.h
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-
#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_F16SQRTL_H
#define LLVM_LIBC_SRC___SUPPORT_MATH_F16SQRTL_H
#include "include/llvm-libc-macros/float16-macros.h"
diff --git a/libc/src/math/generic/f16sqrtl.cpp b/libc/src/math/generic/f16sqrtl.cpp
index 4ad47b2fe..a40bc3a26 100644
--- a/libc/src/math/generic/f16sqrtl.cpp
+++ b/libc/src/math/generic/f16sqrtl.cpp
@@ -1,4 +1,5 @@
-//===-- Implementation of f16sqrtl function --------------------------------===//
+//===-- Implementation of f16sqrtl function
+//--------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
``````````
</details>
https://github.com/llvm/llvm-project/pull/176333
More information about the libc-commits
mailing list