[libc-commits] [libc] [llvm] [libc][math][c23] Improve rsqrtf16 function for targets without fp32 FPUs. (PR #160639)
via libc-commits
libc-commits at lists.llvm.org
Mon Jun 15 07:58:46 PDT 2026
================
@@ -215,20 +215,22 @@ target_link_libraries(libc.benchmarks.memory_functions.opt_host
)
llvm_update_compile_flags(libc.benchmarks.memory_functions.opt_host)
-add_executable(libc.benchmarks.rsqrtf16.opt_host
- EXCLUDE_FROM_ALL
- LibcRsqrtf16GoogleBenchmarkMain.cpp
-)
-target_include_directories(libc.benchmarks.rsqrtf16.opt_host
- PRIVATE
- ${LIBC_SOURCE_DIR}
- ${LIBC_INCLUDE_DIR}
-)
-target_link_libraries(libc.benchmarks.rsqrtf16.opt_host
- PRIVATE
- benchmark_main
- libc-benchmark
- libc.src.errno.errno.__internal__
- libc.src.__support.math.rsqrtf16
-)
-llvm_update_compile_flags(libc.benchmarks.rsqrtf16.opt_host)
+if(LIBC_TYPES_HAS_FLOAT16)
+ add_executable(libc.benchmarks.rsqrtf16.opt_host
+ EXCLUDE_FROM_ALL
+ LibcRsqrtf16GoogleBenchmarkMain.cpp
+ )
+ target_include_directories(libc.benchmarks.rsqrtf16.opt_host
+ PRIVATE
+ ${LIBC_SOURCE_DIR}
+ ${LIBC_INCLUDE_DIR}
+ )
+ target_link_libraries(libc.benchmarks.rsqrtf16.opt_host
+ PRIVATE
+ benchmark_main
+ libc-benchmark
+ libc.src.errno.errno.__internal__
+ libc.src.__support.math.rsqrtf16
+ )
+ llvm_update_compile_flags(libc.benchmarks.rsqrtf16.opt_host)
+ endif()
----------------
lntue wrote:
nit: missing EOF line.
https://github.com/llvm/llvm-project/pull/160639
More information about the libc-commits
mailing list