aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorLucas Duarte Prates <lucas.prates@arm.com>2025-04-28 10:01:54 +0100
committerGitHub <noreply@github.com>2025-04-28 10:01:54 +0100
commit8506980d30fd2faf41518f24e985f820609a7bd0 (patch)
tree34423603e6d0193a82df1f7bfb068c6c02241203 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parent1f69d6354a4b088bda5ee62c31411a75eead8b0c (diff)
downloadllvm-8506980d30fd2faf41518f24e985f820609a7bd0.zip
llvm-8506980d30fd2faf41518f24e985f820609a7bd0.tar.gz
llvm-8506980d30fd2faf41518f24e985f820609a7bd0.tar.bz2
[Analysis] Ensure use of strict fp exceptions in ConstantFolding (#136139)
To perform constant folding in math operations, the implementation of the ConstantFolding Analysis relies on the use of the math functions from the host's libm. In particular, it relies on checking the value of errno and IEEE exceptions to determine when an operation is safe to be constant-folded. On some platforms, such as BSD or Darwin, math library functions don't set errno, so the ConstantFolding check depends only on the value of IEEE exceptions. As the FP exception behaviour is set to `ignore` by default, the compiler can perform optimisations that would get in the way of such checks being performed correctly. This patch sets the FP exception behaviour to `strict` when compiling the `ConstantFolding.cpp` source file, ensuring the value of IEEE exceptions can be reliably used by its implementation.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions