[llvm] [SelectionDAG] Remove UnsafeFPMath check in `visitFADDForFMACombine` (PR #127770)

via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 22 04:47:11 PST 2025


paperchalice wrote:

> Have you looked at what happens when you compile with -ffp-contract=fast-honor-pragmas? As mentioned at https://discourse.llvm.org/t/allowfpopfusion-vs-sdnodeflags-hasallowcontract/80909 I have seen some backends not generating FMA when that option is used, and I think this change could make it worse in the case of options like `-funsafe-math-optimizations -ffp-contract=fast-honor-pragmas`.

Didn't check with clang but llc with option `-fp=contract=fast`, for the 4th example in link now can generate fma instruction.

https://github.com/llvm/llvm-project/pull/127770


More information about the llvm-commits mailing list