[libc-commits] [libc] [libc] Implement basic 'fenv.h' utilities on the AMD GPU (PR #83500)

via libc-commits libc-commits at lists.llvm.org
Sat May 4 06:50:19 PDT 2024


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 70b79a9ccd03f93fc4c8464a91b6bef3aab322d3 7585511ffbccc6fedf39aec20b3a469044601748 -- libc/src/__support/FPUtil/amdgpu/FEnvImpl.h libc/include/llvm-libc-macros/math-macros.h libc/include/llvm-libc-types/fenv_t.h libc/src/__support/FPUtil/FEnvImpl.h libc/test/src/fenv/rounding_mode_test.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/__support/FPUtil/amdgpu/FEnvImpl.h b/libc/src/__support/FPUtil/amdgpu/FEnvImpl.h
index 7f97a243ee..dcb7e04ccc 100644
--- a/libc/src/__support/FPUtil/amdgpu/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/amdgpu/FEnvImpl.h
@@ -133,9 +133,7 @@ LIBC_INLINE void set_rounding_mode(uint32_t mode) {
 // Get the hardware rounding mode using the llvm.get.rounding intrinsic
 // function.
 // FIXME: This requires `noinline` to flush the hardware register in time.
-LIBC_INLINE uint32_t get_rounding_mode() {
-  return __builtin_flt_rounds();
-}
+LIBC_INLINE uint32_t get_rounding_mode() { return __builtin_flt_rounds(); }
 
 } // namespace internal
 

``````````

</details>


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


More information about the libc-commits mailing list