The handling of 'funsafe-math-optimizations' doesn't update the 'MathErrno'
flag. But the driver checks for 'fno-math-errno' before passing 'funsafe-math-optimizations' to the FE. In GCC, the option 'funsafe-math-optimizations' doesn't affect the 'fmath-errno' flag. This patch aligns clang with GCC. '-ffast-math' sets the FPContract to 'fast'. But 'funsafe-math-optimizations' the driver doesn't consider the FPContract when handling the option. Unfortunately there are places in the BE that interpret unsafe math mode as allowing FMA. This patch makes -ffast-math' and 'funsafe-math-optimizations' behave similarly in regard to the setting of the FPContract. Differential Revision: https://reviews.llvm.org/D137578
Loading
Please sign in to comment