[PATCH] D75982: [DAGCombine] Respect the uses when combine FMA for a*b+/-c*d

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 01:36:52 PDT 2020


lebedev.ri added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11923
+  // prefer to fold the multiply with fewer uses.
+  if (Aggressive && isContractableFMUL(N0) && isContractableFMUL(N1) &&
+      (N0.getNode()->use_size() > N1.getNode()->use_size())) {
----------------
I'm not sure why `Aggressive && isContractableFMUL(N0) && isContractableFMUL(N1)` check is here?
That is already checked in the lambdas.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75982/new/

https://reviews.llvm.org/D75982





More information about the llvm-commits mailing list