Skip to content

Commit f33245a

Browse files
committed
[AArch64] Fix a always true condition warning. NFC
As ImmVal is unsigned, it will always be >= 0
1 parent d4a6995 commit f33245a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ static DecodeStatus DecodePCRelLabel16(MCInst &Inst, unsigned Imm,
896896
// Immediate is encoded as the top 16-bits of an unsigned 18-bit negative
897897
// PC-relative offset.
898898
uint64_t ImmVal = Imm;
899-
if (ImmVal < 0 || ImmVal > (1 << 16))
899+
if (ImmVal > (1 << 16))
900900
return Fail;
901901
ImmVal = -ImmVal;
902902
if (!Decoder->tryAddingSymbolicOperand(Inst, (ImmVal << 2), Addr,

0 commit comments

Comments
 (0)