Skip to content

Commit

Permalink
[Analysis] Guard logf128 cst folding
Browse files Browse the repository at this point in the history
LLVM has a CMake variable to control whether to consider logf128
constant folding which libAnalysis ignores. This patch changes the
logf128 check to rely on the global LLVM_HAS_LOGF128 setting made in
config-ix.cmake.
  • Loading branch information
RoboTux committed Aug 29, 2024
1 parent 9167667 commit 42d3ccc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions llvm/lib/Analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ add_llvm_component_library(LLVMAnalysis
TargetParser
)

include(CheckCXXSymbolExists)
check_cxx_symbol_exists(logf128 math.h HAS_LOGF128)
if(HAS_LOGF128)
target_compile_definitions(LLVMAnalysis PRIVATE HAS_LOGF128)
if(LLVM_HAS_LOGF128)
target_compile_definitions(LLVMAnalysis PRIVATE HAS_LOGF128)
endif()

0 comments on commit 42d3ccc

Please sign in to comment.