diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp index b22fa875e06..88a4a684f0c 100644 --- a/utils/TableGen/DAGISelMatcherGen.cpp +++ b/utils/TableGen/DAGISelMatcherGen.cpp @@ -535,7 +535,7 @@ void MatcherGen::EmitResultLeafAsOperand(const TreePatternNode *N, // in COPY_TO_SUBREG instructions. if (DI->getDef()->isSubClassOf("RegisterClass")) { std::string Value = getQualifiedName(DI->getDef()) + "RegClassID"; - AddMatcherNode(new EmitStringIntegerMatcherNode(Value, N->getTypeNum(0))); + AddMatcherNode(new EmitStringIntegerMatcherNode(Value, MVT::i32)); ResultOps.push_back(NextRecordedOperandNo++); return; }