[clang] [llvm] [mlir] [IR] Make semantics of strictfp consistent v2 (PR #211769)
Nathan Corbyn via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 03:06:37 PDT 2026
================
@@ -2800,7 +2800,8 @@ fn -> other_fn -> other_fn ; fn is norecurse
optimizations that require assumptions about the floating-point rounding
mode or that might alter the state of floating-point status flags that
might otherwise be set or cleared by calling this function. LLVM will
- not introduce any new floating-point instructions that may trap.
+ not introduce any new floating-point instructions that may trap. All
+ function definitions that contain strictfp calls must be marked strictfp.
----------------
cofibrant wrote:
AFAIU, a call to a non-intrinsic `strictfp` function will be lowered to a call instruction which is insensitive to FP optimisations and therefore safe outside of a `strictfp` context. A constrained FP intrinsic, on the other hand, will be selected to a platform-specific FP opcode which will be sensitive to FP optimisations and should not be optimised around (this is what the `strictfp` attribute communicates about a function body).
https://github.com/llvm/llvm-project/pull/211769
More information about the llvm-commits
mailing list