From: Simon Pilgrim Date: Fri, 22 May 2020 11:28:26 +0000 (+0100) Subject: [AVR] Remove unsigned <= 0 checks. NFCI. X-Git-Tag: llvmorg-12-init~5354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1386728fc2ff8ea064ef82c2e52d2aa208f71891;p=platform%2Fupstream%2Fllvm.git [AVR] Remove unsigned <= 0 checks. NFCI. D77207 changed the bounds checks resulting in tests for positive unsigned values - dropping the superfluous check to fix gcc+Werror "error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]" warning. --- diff --git a/llvm/lib/Target/AVR/AVRInstrInfo.td b/llvm/lib/Target/AVR/AVRInstrInfo.td index 5012ddf..e64f465 100644 --- a/llvm/lib/Target/AVR/AVRInstrInfo.td +++ b/llvm/lib/Target/AVR/AVRInstrInfo.td @@ -128,21 +128,21 @@ def ioaddr8 : PatLeaf<(imm), [{ uint8_t offset = Subtarget->getIORegisterOffset(); uint64_t val = N->getZExtValue() - offset; - return val >= 0x0 && val < 0x40; + return val < 0x40; }], ioaddr_XFORM>; def lowioaddr8 : PatLeaf<(imm), [{ uint8_t offset = Subtarget->getIORegisterOffset(); uint64_t val = N->getZExtValue() - offset; - return val >= 0x0 && val < 0x20; + return val < 0x20; }], ioaddr_XFORM>; def ioaddr16 : PatLeaf<(imm), [{ uint8_t offset = Subtarget->getIORegisterOffset(); uint64_t val = N->getZExtValue() - offset; - return val >= 0x0 && val < 0x3f; + return val < 0x3f; }], ioaddr_XFORM>; def iobitpos8 : PatLeaf<(imm),