[llvm-branch-commits] [llvm] [FPEnv][SDAG] Implement FNEARBYINT with optional chain (PR #163081)
Serge Pavlov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Oct 19 22:58:20 PDT 2025
spavloff wrote:
The use of mandatory chain argument is discussed here: https://discourse.llvm.org/t/rfc-change-of-strict-fp-operation-representation-in-ir/85021.
Using null chain is an interesting solution, because it allows detecting problems earlier. If we choose mandatory chain, it could be better than using the entry node.
> Is this a prerequisite for the IR refactoring you're looking at, or just a related cleanup? I don't see any obvious connection (as long as there's some way to translate from LLVM IR to SelectionDAG, it doesn't matter if it exactly matches).
No, this is independent solution for similar problem.
> If this optional-chain thing works well, maybe we could also use it for https://github.com/llvm/llvm-project/issues/2535.
It is very interesting case. Solving that problem probably requires setting memory effects for sdiv/udiv, but DAG definitely has to be fixed.
https://github.com/llvm/llvm-project/pull/163081
More information about the llvm-branch-commits
mailing list