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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 22:35:45 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/ISDOpcodes.h:1351
+/// Translate this non-VP Opcode to its corresponding VP Opcode.
+unsigned getVPForFunctionOpcode(unsigned Opcode);
+
----------------
Should this be renamed too?


================
Comment at: llvm/include/llvm/IR/VPIntrinsics.def:111
+// \p SDOPC      The opcode of the instruction with the same function.
+#ifndef VP_PROPERTY_FUNCTIONAL_SDOPC
+#define VP_PROPERTY_FUNCTIONAL_SDOPC(SDOPC)
----------------
And this?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:886
+
+    auto FuncOpc = ISD::getBaseOpcodeForVP(OpVal->getOpcode(),
+                                           !OpVal->getFlags().hasNoFPExcept());
----------------
Rename FuncOpc to match new name


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14698
 
+  bool UseVP = std::is_same<MatchContextClass, VPMatchContext>::value;
+
----------------
I think we can use `std::is_same_v<MatchContextClass, VPMatchContext>` since we are on C++17


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