[libclc] [libclc] Enable -ffp-contract=fast compile option for math native_* functions (PR #153137)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 11 21:57:57 PDT 2025


================
@@ -304,7 +304,7 @@ set_source_files_properties(
   ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_sin.cl
   ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_sqrt.cl
   ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/math/native_tan.cl
-  PROPERTIES COMPILE_OPTIONS -fapprox-func
+  PROPERTIES COMPILE_OPTIONS "-fapprox-func;-ffp-contract=fast"
----------------
arsenm wrote:

Also maybe should use `-ffp-contract=fast-honor-pragmas`, not sure if the stupid interpretation ever got fixed for fast 

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


More information about the cfe-commits mailing list