[PATCH] D141891: [VP][DAGCombiner] Introduce generalized pattern match for vp sdnodes.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 13:55:01 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:911
+  // DAG.getNode(Opcode, DL, VT); }
+  SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, SDValue Operand,
+                  std::optional<SDNodeFlags> Flags = std::nullopt) {
----------------
Unless I can figure out some template magic, I think I'd like to see each of these getNode's split into two functions. One that takes SDNodeFlags and one that doesn't. As it as now we're kind of abusing std::optional to count parameters.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141891



More information about the llvm-commits mailing list