[llvm] [DAGCombine] Count leading ones: refine post DAG/Type Legalisation if promotion (PR #102877)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 09:21:44 PDT 2024


================
@@ -47,6 +47,8 @@ class BasicMatchContext {
   bool match(SDValue N, unsigned Opcode) const {
     return N->getOpcode() == Opcode;
   }
+
+  static constexpr bool IsVP = false;
----------------
mshockwave wrote:

have you explored the ideas of abstracting the number of operands instead? Specifically, having a match context to implement its own version of `unsigned getNumOperands(SDValue N)` (or something similar)?

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


More information about the llvm-commits mailing list