public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jeff Law <law@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Fix warning in predicated.md
Date: Fri, 14 Jul 2023 02:42:30 +0000 (GMT)	[thread overview]
Message-ID: <20230714024230.7104C3857B93@sourceware.org> (raw)

https://gcc.gnu.org/g:2efb0b56bc5e7dffbb3c9c567c63745cdafab85e

commit 2efb0b56bc5e7dffbb3c9c567c63745cdafab85e
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Fri Jun 2 17:33:33 2023 +0800

    RISC-V: Fix warning in predicated.md
    
    Notice there is warning in predicates.md:
    ../../../riscv-gcc/gcc/config/riscv/predicates.md: In function ‘bool arith_operand_or_mode_mask(rtx, machine_mode)’:
    ../../../riscv-gcc/gcc/config/riscv/predicates.md:33:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 (match_test "INTVAL (op) == GET_MODE_MASK (HImode)
    ../../../riscv-gcc/gcc/config/riscv/predicates.md:34:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         || INTVAL (op) == GET_MODE_MASK (SImode)"))))
    
    gcc/ChangeLog:
    
            * config/riscv/predicates.md: Change INTVAL into UINTVAL.

Diff:
---
 gcc/config/riscv/predicates.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/riscv/predicates.md b/gcc/config/riscv/predicates.md
index d14b1ca30bb..04ca6ceabc7 100644
--- a/gcc/config/riscv/predicates.md
+++ b/gcc/config/riscv/predicates.md
@@ -30,7 +30,7 @@
 (define_predicate "arith_operand_or_mode_mask"
   (ior (match_operand 0 "arith_operand")
        (and (match_code "const_int")
-            (match_test "INTVAL (op) == GET_MODE_MASK (HImode)
+            (match_test "UINTVAL (op) == GET_MODE_MASK (HImode)
 			 || UINTVAL (op) == GET_MODE_MASK (SImode)"))))
 
 (define_predicate "lui_operand"

             reply	other threads:[~2023-07-14  2:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  2:42 Jeff Law [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-14  2:42 Jeff Law
2023-06-05 16:18 Jeff Law
2023-06-05 16:17 Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230714024230.7104C3857B93@sourceware.org \
    --to=law@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).