diff --git a/llvm/utils/TableGen/X86RecognizableInstr.cpp b/llvm/utils/TableGen/X86RecognizableInstr.cpp index ae01014ddd235..1ae90d888a7dc 100644 --- a/llvm/utils/TableGen/X86RecognizableInstr.cpp +++ b/llvm/utils/TableGen/X86RecognizableInstr.cpp @@ -840,8 +840,8 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const { uint8_t currentOpcode; - for (currentOpcode = opcodeToSet; currentOpcode < opcodeToSet + Count; - ++currentOpcode) + for (currentOpcode = opcodeToSet; + currentOpcode < (uint8_t)(opcodeToSet + Count); ++currentOpcode) tables.setTableFields(*opcodeType, insnContext(), currentOpcode, *filter, UID, Is32Bit, OpPrefix == 0, IgnoresVEX_L || EncodeRC,