[llvm] Enable logf128 constant folding for hosts with 128bit long double (PR #96287)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 10:48:58 PDT 2024
================
@@ -271,6 +260,64 @@ if(C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unguarded-availability-new")
endif()
+function(logf128_test testname definition)
+ unset(LOGF128_TEST_RUN CACHE)
+ unset(LOGF128_TEST_COMPILE CACHE)
+ try_run(
+ LOGF128_TEST_RUN
----------------
efriedma-quic wrote:
Using try_run tends to lead to strange results with cross-compiling; do we really need it here? _Float128/__float128 should always mean what we want it to, and we can use `__LDBL_MANT_DIG__` for long double.
https://github.com/llvm/llvm-project/pull/96287
More information about the llvm-commits
mailing list