[llvm] [DAGCombiner] Fold freeze(fmul) + fadd/fsub into FMA combine (PR #142250)

Harrison Hao via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 1 07:16:32 PDT 2025


harrisonGPU wrote:

> SelectionDAG::canCreateUndefOrPoison checks for hasPoisonGeneratingFlags - which seems to cover nonans/noinfs - but we'd definitely need to have test coverage for this.

Thanks a lot! I’ll add a test case with nnan / ninf to verify that canCreateUndefOrPoison correctly returns true when required.
I'm also preparing a new PR with lit tests ensuring that SelectionDAG::canCreateUndefOrPoison returns false for plain FP ops without poison-generating flags.

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


More information about the llvm-commits mailing list