[libclc] 2a48aab - [libclc] Enable -ffp-contract=fast-honor-pragmas globally (#153137)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 18 18:07:11 PST 2026
Author: Wenju He
Date: 2026-02-19T10:07:06+08:00
New Revision: 2a48aab50254d0ecf1156580276a88505c7bdc40
URL: https://github.com/llvm/llvm-project/commit/2a48aab50254d0ecf1156580276a88505c7bdc40
DIFF: https://github.com/llvm/llvm-project/commit/2a48aab50254d0ecf1156580276a88505c7bdc40.diff
LOG: [libclc] Enable -ffp-contract=fast-honor-pragmas globally (#153137)
Enable -ffp-contract=fast-honor-pragmas globally improves performance.
Verified that exp, trig, and hyperbolic functions pass the OpenCL CTS on
Intel GPUs with this flag enabled.
Note: exp/exp2 still require the fixes proposed in #179875; however,
those failures are independent of the fp-contract changes in this patch.
Added:
Modified:
libclc/CMakeLists.txt
Removed:
################################################################################
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 77c3dca51d3d5..50fdb0669ea4b 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -389,6 +389,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
# Error on undefined macros
-Werror=undef
-fdiscard-value-names
+ -ffp-contract=fast-honor-pragmas
)
if( NOT "${cpu}" STREQUAL "" )
More information about the cfe-commits
mailing list