[PATCH] D152260: [DAGCombiner] Use generalized pattern matcher in visitFMA to support vp.fma.

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 06:30:29 PDT 2023


luke added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:6819
   // fneg is removable even if it has multiple uses.
-  if (Op.getOpcode() == ISD::FNEG) {
+  if (Op.getOpcode() == ISD::FNEG || Op.getOpcode() == ISD::VP_FNEG) {
     Cost = NegatibleCost::Cheaper;
----------------
Is the negation of VP_FNEG still operand 0 if the mask isn't all ones or the EVL is less than the vector width?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152260



More information about the llvm-commits mailing list