arsenm wrote:

> * Which value allows generating the "fastest" math code -- disregarding 
> correctness? I'd assume that "dynamic" is least optimizable, "ieee" in the 
> middle, and "preserve-sign" is likely to generate the "fastest" code?

This depends on the target and operations. For some functions, on modern 
hardware, the preserve-sign code will be worse for AMDGPU. In other cases it's 
better 

> What is the likely actual impact of choosing the wrong value? Ie, what does 
> "it is not always safe" mean? Is this wrong beyond what is usually expected 
> from -ffast-math optimizations?

The main example is the conversions performed between fcmp with 0 and 
llvm.is.fpclass. You'll get different results depending on whether the input is 
implicitly flushed in fcmp vs. not in the is.fpclass 

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