andykaylor wrote:

I don't know anything about how non-x86 targets implement DAZ/FTZ, but for 
x86-based targets, I think trying to make any assumptions about the setting is 
bound to be wrong. In theory, it's part of the floating-point environment and 
shouldn't be modified during execution unless fenv-access is enabled.

In practical terms, I can't see any reason that you would ever want a shared 
library to be able to control this. I don't like the idea of adding an option 
to maintain that behavior, and I think we should make it a high priority to 
stop doing it by default when a shared library is compiled with fast-math 
enabled.

More generally, if you're going to be mixing fast-math with non-fast-math 
within a program, you don't want FTZ/DAZ to be enabled just because some parts 
of the program are using fast-math, so the current behavior of linking with 
crtfastmath.o is fairly reckless.

https://github.com/llvm/llvm-project/pull/80475
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to