[llvm-branch-commits] [TableGen][InstrInfoEmitter] Count sub-operands on def operands (PR #88972)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 16 14:35:26 PDT 2024
================
@@ -1181,9 +1181,15 @@ void InstrInfoEmitter::emitRecord(
// Each logical operand can be multiple MI operands.
MinOperands =
Inst.Operands.back().MIOperandNo + Inst.Operands.back().MINumOperands;
+ // Even the logical output operand may be multiple MI operands.
+ int DefOperands = 0;
+ if (Inst.Operands.NumDefs) {
+ auto &Opnd = Inst.Operands[Inst.Operands.NumDefs - 1];
+ DefOperands = Opnd.MIOperandNo + Opnd.MINumOperands;
+ }
----------------
arsenm wrote:
We probably should have some better helpers for dealing with these compound operands
https://github.com/llvm/llvm-project/pull/88972
More information about the llvm-branch-commits
mailing list