[llvm] [DAG] SelectionDAG::canCreateUndefOrPoison - add ISD::FMA/FMAD + tests (PR #152187)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 6 05:17:26 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:

> Please can you fix the clang-format warning (trailing whitespace?)
Yes, of course, I missed it by accident. 
Now, I noticed issue on "negative" tests. As I thought, after add poison in argument, freeze will not be an empty instruction and fma + freeze + fneg not to turn into fnmadd. But it still happens, apparently I misunderstood something. Advise please what is the best way to fix this?

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


More information about the llvm-commits mailing list