[libc-commits] [PATCH] D123615: [libc] Automatically add -mfma flag for architectures supporting FMA.
Guillaume Chatelet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 1 04:33:46 PDT 2022
gchatelet added inline comments.
================
Comment at: libc/cmake/modules/LLVMLibCObjectRules.cmake:17
list(APPEND compile_options "-fno-rtti")
+ if((${fma} GREATER -1) AND (LIBC_CPU_FEATURES MATCHES "FMA"))
+ list(APPEND compile_options "-mfma")
----------------
It would make sense to factor the two conditions inside the `fma` variable.
================
Comment at: libc/test/src/math/CMakeLists.txt:1204-1205
libc.src.__support.FPUtil.fputil
+ FLAGS
+ FMA_OPT__ONLY
)
----------------
I'm not sure I understand the semantic here. Does that mean that the test requires FMA?
If so does it? It would make sense to test it with and without FMA.
Maybe I missed something.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123615/new/
https://reviews.llvm.org/D123615
More information about the libc-commits
mailing list