diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -56,6 +56,7 @@ std::set OperandNames; unsigned e = InDI->getNumArgs() + OutDI->getNumArgs(); OperandList.reserve(e); + bool VariadicOuts = false; for (unsigned i = 0; i != e; ++i){ Init *ArgInit; StringRef ArgName; @@ -109,6 +110,8 @@ else if (Rec->isSubClassOf("OptionalDefOperand")) hasOptionalDef = true; } else if (Rec->getName() == "variable_ops") { + if (i < NumDefs) + VariadicOuts = true; isVariadic = true; continue; } else if (Rec->isSubClassOf("RegisterClass")) {