[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
================
@@ -464,7 +467,7 @@ struct TernaryOpc_match {
bool match(const MatchContext &Ctx, SDValue N) {
if (sd_context_match(N, Ctx, m_Opc(Opcode))) {
EffectiveOperands<ExcludeChain> EO(N);
- assert(EO.Size == 3);
+ assert(EO.Size == 3U + 2 * N->isVPOpcode());
----------------
mshockwave wrote:
would it be better if we put this into `EffectiveOperands`? `EffectiveOperands` was invented to abstract away "don't care" operands, like input chain, under certain circumstances so I feel like it fits well with what you're doing here.
https://github.com/llvm/llvm-project/pull/102877
More information about the llvm-commits
mailing list