[llvm] [DAG] SelectionDAG::canCreateUndefOrPoison - add ISD::FMA/FMAD + tests (PR #152187)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 8 02:54:33 PDT 2025
================
@@ -5622,6 +5622,8 @@ bool SelectionDAG::canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts,
case ISD::FDIV:
case ISD::FREM:
case ISD::FCOPYSIGN:
+ case ISD::FMA:
+ case ISD::FMAD:
----------------
Seraphimt wrote:
I rely on words @RKSimon in task:
> the freeze between the fneg and the fma is preventing the fold into fnmadd from occurring. But if the compiler knows ISD::FMA doesn't create undef/poison itself then its enough to freeze the inputs like in @tgt (as that's the only place that undef/poison can come from)
https://github.com/llvm/llvm-project/issues/147693#issuecomment-3061036980
So why in poison argument case fma + freeze + fneg turn into fnmadd still?
https://github.com/llvm/llvm-project/pull/152187
More information about the llvm-commits
mailing list