yaxunl added a comment. In D90174#2373829 <https://reviews.llvm.org/D90174#2373829>, @yaxunl wrote:
> In D90174#2371577 <https://reviews.llvm.org/D90174#2371577>, @rjmccall wrote: > >> Hmm. Do we actually want this behavior of `fast` overriding pragmas? What >> do other compilers do here? It might be reasonable to just treat this as a >> bug. > > I think clang is just trying to follow gcc's behavior. However, this is > undesirable in certain cases. Introducing 'faststd' gives us more choices to > avoid the undesirable behavior. For other compilers: MSVC respects pragma with /fp:fast option: https://godbolt.org/z/3rja55 Intel compiler also respects fp_contract pragma with -fp-model fast={1|2} option: https://godbolt.org/z/fez86h nvcc by default always fuse across statements and does not support pragmas to control fp contract https://docs.nvidia.com/cuda/floating-point/index.html#controlling-fused-multiply-add CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90174/new/ https://reviews.llvm.org/D90174 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits