[llvm-branch-commits] [compiler-rt] [libc] [compiler-rt][builtins] libc-backed float80-int conversion builtins (PR #215728)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 11 22:47:22 PDT 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 -- compiler-rt/lib/builtins/fixunsxfdi.cpp compiler-rt/lib/builtins/fixunsxfsi.cpp compiler-rt/lib/builtins/fixunsxfti.cpp compiler-rt/lib/builtins/fixxfdi.cpp compiler-rt/lib/builtins/fixxfti.cpp compiler-rt/lib/builtins/floatdixf.cpp compiler-rt/lib/builtins/floattixf.cpp compiler-rt/lib/builtins/floatundixf.cpp compiler-rt/lib/builtins/floatuntixf.cpp libc/shared/builtins/fixunsxfdi.h libc/shared/builtins/fixunsxfsi.h libc/shared/builtins/fixunsxfti.h libc/shared/builtins/fixxfdi.h libc/shared/builtins/fixxfti.h libc/shared/builtins/floatdixf.h libc/shared/builtins/floattixf.h libc/shared/builtins/floatundixf.h libc/shared/builtins/floatuntixf.h libc/src/__support/builtins/fixunsxfdi.h libc/src/__support/builtins/fixunsxfsi.h libc/src/__support/builtins/fixunsxfti.h libc/src/__support/builtins/fixxfdi.h libc/src/__support/builtins/fixxfti.h libc/src/__support/builtins/floatdixf.h libc/src/__support/builtins/floattixf.h libc/src/__support/builtins/floatundixf.h libc/src/__support/builtins/floatuntixf.h libc/shared/builtins.h libc/test/shared/shared_builtins_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/src/__support/builtins/fixunsxfdi.h b/libc/src/__support/builtins/fixunsxfdi.h
index 7ba7784b6..2ed4cd34f 100644
--- a/libc/src/__support/builtins/fixunsxfdi.h
+++ b/libc/src/__support/builtins/fixunsxfdi.h
@@ -28,9 +28,7 @@ namespace builtins {
 
 // Truncating long double -> uint64_t conversion, saturating on overflow.
 // Mirrors compiler-rt's __fixunsxfdi.
-LIBC_INLINE uint64_t fixunsxfdi(long double x) {
-  return fixuint<uint64_t>(x);
-}
+LIBC_INLINE uint64_t fixunsxfdi(long double x) { return fixuint<uint64_t>(x); }
 
 } // namespace builtins
 } // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/__support/builtins/fixunsxfsi.h b/libc/src/__support/builtins/fixunsxfsi.h
index f663d7635..b201c094f 100644
--- a/libc/src/__support/builtins/fixunsxfsi.h
+++ b/libc/src/__support/builtins/fixunsxfsi.h
@@ -28,9 +28,7 @@ namespace builtins {
 
 // Truncating long double -> uint32_t conversion, saturating on overflow.
 // Mirrors compiler-rt's __fixunsxfsi.
-LIBC_INLINE uint32_t fixunsxfsi(long double x) {
-  return fixuint<uint32_t>(x);
-}
+LIBC_INLINE uint32_t fixunsxfsi(long double x) { return fixuint<uint32_t>(x); }
 
 } // namespace builtins
 } // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/__support/builtins/fixxfdi.h b/libc/src/__support/builtins/fixxfdi.h
index 796e6e98c..842ddf444 100644
--- a/libc/src/__support/builtins/fixxfdi.h
+++ b/libc/src/__support/builtins/fixxfdi.h
@@ -28,9 +28,7 @@ namespace builtins {
 
 // Truncating long double -> int64_t conversion, saturating on overflow.
 // Mirrors compiler-rt's __fixxfdi.
-LIBC_INLINE int64_t fixxfdi(long double x) {
-  return fixint<int64_t>(x);
-}
+LIBC_INLINE int64_t fixxfdi(long double x) { return fixint<int64_t>(x); }
 
 } // namespace builtins
 } // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/__support/builtins/fixxfti.h b/libc/src/__support/builtins/fixxfti.h
index b11f8f847..50cd633d2 100644
--- a/libc/src/__support/builtins/fixxfti.h
+++ b/libc/src/__support/builtins/fixxfti.h
@@ -29,9 +29,7 @@ namespace builtins {
 
 // Truncating long double -> __int128_t conversion, saturating on overflow.
 // Mirrors compiler-rt's __fixxfti.
-LIBC_INLINE __int128_t fixxfti(long double x) {
-  return fixint<__int128_t>(x);
-}
+LIBC_INLINE __int128_t fixxfti(long double x) { return fixint<__int128_t>(x); }
 
 } // namespace builtins
 } // namespace LIBC_NAMESPACE_DECL

``````````

</details>


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


More information about the llvm-branch-commits mailing list