[llvm] [SelectionDAG] Remove UnsafeFPMath check in `visitFADDForFMACombine` (PR #127770)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 18:11:07 PST 2025
paperchalice wrote:
> My concern was that with `-ffp-contract=fast-honor-pragmas` on the command-line, clang sets `AllowOpFusion` to `FPOpFusion::Standard` not `FPOpFusion::Fast`. This is happening specifically because the backend was fusing operations where `contract` wasn't set because of a pragma.
Retried with `-fp-contrast=on`, it doesn't generate fma instruction.
> Looking again at the first case you modified in DAGCombiner, I see that it is checking the node flag immediately after the check that you modified, so that is the desired behavior, but the second case doesn't appear to check the node FMF and, in fact, has a FIXME comment saying that it should.
Yes, it should check fast math flags like `nsz` etc. but when `nsz` flag is added into the test case, IR passes optimized these instructions...
https://github.com/llvm/llvm-project/pull/127770
More information about the llvm-commits
mailing list