[libc-commits] [libc] 2f8829a - [libc] Add mfma option to functions that use fma

Michael Jones via libc-commits libc-commits at lists.llvm.org
Tue Mar 29 16:23:42 PDT 2022


Author: Michael Jones
Date: 2022-03-29T16:23:36-07:00
New Revision: 2f8829aba3cae7057d9a2b18f7e5ed95a1bd33d1

URL: https://github.com/llvm/llvm-project/commit/2f8829aba3cae7057d9a2b18f7e5ed95a1bd33d1
DIFF: https://github.com/llvm/llvm-project/commit/2f8829aba3cae7057d9a2b18f7e5ed95a1bd33d1.diff

LOG: [libc] Add mfma option to functions that use fma

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.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D122689

Added: 
    

Modified: 
    libc/src/math/CMakeLists.txt
    libc/src/math/generic/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index b0b27126e6383..9737f4a362dc0 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -50,6 +50,7 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.fputil
   COMPILE_OPTIONS
     -O2
+    -mfma
 )
 
 add_entrypoint_object(
@@ -62,6 +63,7 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.fputil
   COMPILE_OPTIONS
     -O2
+    -mfma
 )
 
 add_math_entrypoint_object(ceil)

diff  --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 2265fa2a17b3d..b3f1a34bdea36 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -481,6 +481,7 @@ add_entrypoint_object(
     libc.include.math
   COMPILE_OPTIONS
     -O3
+    -mfma
 )
 
 add_entrypoint_object(
@@ -494,6 +495,7 @@ add_entrypoint_object(
     libc.include.math
   COMPILE_OPTIONS
     -O3
+    -mfma
 )
 
 add_entrypoint_object(
@@ -508,6 +510,7 @@ add_entrypoint_object(
     libc.include.math
   COMPILE_OPTIONS
     -O3
+    -mfma
 )
 
 add_entrypoint_object(
@@ -673,6 +676,7 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.fputil
   COMPILE_OPTIONS
     -O3
+    -mfma
 )
 
 add_entrypoint_object(
@@ -686,6 +690,7 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.fputil
   COMPILE_OPTIONS
     -O3
+    -mfma
 )
 
 add_entrypoint_object(
@@ -712,6 +717,7 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.fputil
   COMPILE_OPTIONS
     -O3
+    -mfma
 )
 
 add_entrypoint_object(


        


More information about the libc-commits mailing list