[libc-commits] [PATCH] D122689: [libc] Add mfma option to functions that use fma
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Mar 29 15:07:04 PDT 2022
michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added projects: libc-project, All.
michaelrj requested review of this revision.
On Windows the functions that use fma don't properly include the fma
intrinsics unless -mfma is added to the compile options. This patch adds
the compile option to all of the functions that need it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122689
Files:
libc/src/math/CMakeLists.txt
libc/src/math/generic/CMakeLists.txt
Index: libc/src/math/generic/CMakeLists.txt
===================================================================
--- libc/src/math/generic/CMakeLists.txt
+++ libc/src/math/generic/CMakeLists.txt
@@ -481,6 +481,7 @@
libc.include.math
COMPILE_OPTIONS
-O3
+ -mfma
)
add_entrypoint_object(
@@ -494,6 +495,7 @@
libc.include.math
COMPILE_OPTIONS
-O3
+ -mfma
)
add_entrypoint_object(
@@ -508,6 +510,7 @@
libc.include.math
COMPILE_OPTIONS
-O3
+ -mfma
)
add_entrypoint_object(
@@ -673,6 +676,7 @@
libc.src.__support.FPUtil.fputil
COMPILE_OPTIONS
-O3
+ -mfma
)
add_entrypoint_object(
@@ -686,6 +690,7 @@
libc.src.__support.FPUtil.fputil
COMPILE_OPTIONS
-O3
+ -mfma
)
add_entrypoint_object(
@@ -712,6 +717,7 @@
libc.src.__support.FPUtil.fputil
COMPILE_OPTIONS
-O3
+ -mfma
)
add_entrypoint_object(
Index: libc/src/math/CMakeLists.txt
===================================================================
--- libc/src/math/CMakeLists.txt
+++ libc/src/math/CMakeLists.txt
@@ -50,6 +50,7 @@
libc.src.__support.FPUtil.fputil
COMPILE_OPTIONS
-O2
+ -mfma
)
add_entrypoint_object(
@@ -62,6 +63,7 @@
libc.src.__support.FPUtil.fputil
COMPILE_OPTIONS
-O2
+ -mfma
)
add_math_entrypoint_object(ceil)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122689.418997.patch
Type: text/x-patch
Size: 1333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220329/f7efd29b/attachment.bin>
More information about the libc-commits
mailing list