[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 5 16:10:27 PST 2024
andykaylor wrote:
> > (Sidenote: "dynamic" isn't even [documented](https://clang.llvm.org/docs/UsersManual.html#cmdoption-fdenormal-fp-math)).
>
> It's not a selectable enum of the Clang `-fdenormal-fp-math` flag, but it is one for the LLVM function attribute `denormal-fp-math`.
This is also a bit of a problem. After inlining we can have instructions with fast-math disabled appearing in the middle of functions that were compiled with fast-math enabled. What happens to the "denormal-fp-math" attribute in such cases? I wanted to show this in compiler explorer, but "#pragma float_control()" doesn't update the "denormal-fp-math attribute.
https://godbolt.org/z/KEP3YEEe9
I may have mentioned a few times that I don't like function attributes controlling fast-math behaviors.
https://github.com/llvm/llvm-project/pull/80475
More information about the cfe-commits
mailing list