Skip to content

Commit

Permalink
Prevent comparison with wider type in loop condition
Browse files Browse the repository at this point in the history
This change fixes the code violations flagged in AMD compute CodeQL scan - "comparison-with-wider-type"

Differential Revision: https://reviews.llvm.org/D122447
  • Loading branch information
aakanksha555 committed Mar 25, 2022
1 parent 635dde8 commit b0225ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/utils/TableGen/X86RecognizableInstr.cpp
Expand Up @@ -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,
Expand Down

0 comments on commit b0225ab

Please sign in to comment.