From 5e623df3e96b7908493df6b98e78420cd42b0903 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 22 May 2020 12:28:26 +0100 Subject: [PATCH] [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. --- lib/Target/AVR/AVRInstrInfo.td | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Target/AVR/AVRInstrInfo.td b/lib/Target/AVR/AVRInstrInfo.td index 5012ddfa7af..e64f465fac7 100644 --- a/lib/Target/AVR/AVRInstrInfo.td +++ b/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),