On Mon, 29 Jun 2020, Segher Boessenkool wrote:
Another question. How do these builtins prevent other FP insns from being moved (or optimised) "over" them?
At the GIMPLE level they don't. They prevent other function calls from moving across, just because function calls where at least one is not pure can't cross, but otherwise fenv_access is one big missing feature in gcc. I started something last year (and postponed indefinitely for lack of time), replacing all FP operations (when the safe mode is enabled) with builtins that get expanded by default to insert asm pass-through on the arguments and the result.
-- Marc Glisse