[libc-commits] [libc] [libc][GPU] Remove code duplicate in GPU math functions (PR #241177)

via libc-commits libc-commits at lists.llvm.org
Wed Nov 11 00:54:09 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {cmake-format}-->


:warning: CMake code formatter, cmake-format found issues in your code. :warning:

<details>
<summary>
You can fix this locally with the following command:
</summary>

``````````bash
python3 libc/utils/cmake_format.py -i libc/src/math/gpu/amdgpu/CMakeLists.txt libc/src/math/gpu/nvptx/CMakeLists.txt libc/src/math/CMakeLists.txt libc/src/math/gpu/CMakeLists.txt
``````````

You can also preview the formatting diff without modifying files:

``````````bash
python3 libc/utils/cmake_format.py --dry-run --diff libc/src/math/gpu/amdgpu/CMakeLists.txt libc/src/math/gpu/nvptx/CMakeLists.txt libc/src/math/CMakeLists.txt libc/src/math/gpu/CMakeLists.txt
``````````

</details>

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

``````````diff
--- a/libc/src/math/gpu/CMakeLists.txt
+++ b/libc/src/math/gpu/CMakeLists.txt
@@ -6,7 +6,7 @@
 # implementations live in the corresponding subdirectory and take precedence
 # over the ones listed here.
 if(NOT LIBC_TARGET_ARCHITECTURE_IS_AMDGPU AND
-   NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
+    NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
   return()
 endif()
 

``````````

</details>


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


More information about the libc-commits mailing list