Index: utils/TableGen/FixedLenDecoderEmitter.cpp =================================================================== --- utils/TableGen/FixedLenDecoderEmitter.cpp +++ utils/TableGen/FixedLenDecoderEmitter.cpp @@ -2066,7 +2066,10 @@ static void emitFieldFromInstruction(formatted_raw_ostream &OS) { OS << "// Helper function for extracting fields from encoded instructions.\n" << "template\n" - << "static InsnType fieldFromInstruction(InsnType insn, unsigned startBit,\n" + << "#if defined(_MSC_VER) && !defined(__clang__)\n" + << "__declspec(noinline)\n" + << "#endif\n" + << "static InsnType fieldFromInstruction(InsnType insn, unsigned startBit,\n" << " unsigned numBits) {\n" << " assert(startBit + numBits <= (sizeof(InsnType)*8) &&\n" << " \"Instruction field out of bounds!\");\n"