diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp index 569931ff698..33b28017e58 100644 --- a/lib/Target/X86/X86CodeEmitter.cpp +++ b/lib/Target/X86/X86CodeEmitter.cpp @@ -526,5 +526,7 @@ void Emitter::emitInstruction(const MachineInstr &MI) { ++CurOp; break; } - assert(CurOp == MI.getNumOperands() && "Unknown encoding!"); + + if ((Desc.Flags & M_VARIABLE_OPS) == 0) + assert(CurOp == MI.getNumOperands() && "Unknown encoding!"); }