Message ID | 20230602030443.124743-1-juzhe.zhong@rivai.ai |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp760777vqr; Thu, 1 Jun 2023 20:05:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Ow9te2wL+JtLPD3odbTynZbKOqhFfai0RnPBS4QwJnmHXMvhnkemJ54tHQhOM2LagiBde X-Received: by 2002:aa7:d590:0:b0:510:6ccf:84aa with SMTP id r16-20020aa7d590000000b005106ccf84aamr1081579edq.32.1685675127941; Thu, 01 Jun 2023 20:05:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685675127; cv=none; d=google.com; s=arc-20160816; b=fc/PLaRmivk77X+v4+YX3dpmi310PROQ2Rg0+Qv8hRkZRyD40O2nN44vHggyLel2Pp TjryV5jNBtjAiLELcJDrNwzzj0fXp81o+Hx3a5pCgzvG57Xu/T5xyghz9zrs4GS0wT8/ /eUpOf4Q+jQ7YT/XFaNsj+ITi9XnmRi37QIt2tzii/Ci3WM4z/nnzD2AM0LhVVLtbpka V5rslt7/u9wQrsxNlH0q35oFqFwhuZ+HsCygxR/kbAUmQAJQYZWQg9R0DI2owDz5oNhH m1sQGqpLMT5y0e7J8f5NDSmctf6h00j9nPyHyAZVt6bg/HlUhKCG41rIWf7IBXd75LvX tPDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=vRocURDkEcYzwEcDYBG8l+NFVRljNwR2Gg+lSAO+DKk=; b=uXa6inRS/tA4IgB03eRZ8cQqTfCAMAxtjAPzqftF8HAJCQQlA5NrTNXyg6fKLXlc1o b4ISBSAtsoEA2GVLc16aVT/24iTMWCm1XUNUSnBrg/Y3dWXOLGjHufOO2IKUgF+58Ox6 OsR9pg++SyFX/7T0DJM5M0B3VBmbc6xL460plrgUD45vTKp8jVRXW7DOg7/99uatM0PA KaxxEWJq5CeO/KbdHj+ix+R+bIlZOP6to3ilp1w1Jh/ghOPT0XAOD0ZH7/Ld2jmxWR4Z UZFE5USH5l3715Yg47jiYYaNtz5XXebeMsF64pMBDc6+tkxfDoKztOaPU2VjilGUSAbb 8mjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id n8-20020a056402060800b00514a65e5b66si173018edv.522.2023.06.01.20.05.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 20:05:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 670AB3857006 for <ouuuleilei@gmail.com>; Fri, 2 Jun 2023 03:05:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbg156.qq.com (smtpbg156.qq.com [15.184.82.18]) by sourceware.org (Postfix) with ESMTPS id 8F2663858D1E for <gcc-patches@gcc.gnu.org>; Fri, 2 Jun 2023 03:04:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F2663858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp86t1685675087trbh1uqm Received: from server1.localdomain ( [58.60.1.22]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 02 Jun 2023 11:04:46 +0800 (CST) X-QQ-SSF: 00400000000000F0R000000A0000000 X-QQ-FEAT: qpc/lE38OU0oT4u6iwnsLRLdsM929yo60xXzeLU/ss0CGMqxFuFUFoUD8WQvv TUIaSHQmm5wadgajBuWf2fNzfpd0hVZ7Zas0gkhS0N60SbS71z8+JSiKpmKBM1pIBCMDcFA M5YLdHEW33vC9toG8Sd5fGFe5X94L0lAT99vOuVCbu+WLUGteohJpZ0dUm1hYodLb5nM+Tw 5AUV+/xwZHllqLJHyVFIiyMUvLCC6O8zwVHGzLnLM/Cxyr9CfzBVorISCnZCawwoWQ5+hJp Pz1JW7yhRHqb0S4eoajcKop/F9v5ZcdoZ81rB1Ynrz3yw0xYKFoDjJRHOrPGpQhErfjPVwG CX/IaFEwHOclmJfVG1H+WXq/CPOf5HG7uSshDtM/LhXP4A77y7jiXIa19KOwxUAIIdV/BVK didz3fIQaHo= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 183402089219314996 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, kito.cheng@sifive.com, palmer@dabbelt.com, palmer@rivosinc.com, jeffreyalaw@gmail.com, rdapp.gcc@gmail.com, Juzhe-Zhong <juzhe.zhong@rivai.ai> Subject: [PATCH] RISC-V: Fix warning in predicated.md Date: Fri, 2 Jun 2023 11:04:43 +0800 Message-Id: <20230602030443.124743-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=all Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, MEDICAL_SUBJECT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767558482832224019?= X-GMAIL-MSGID: =?utf-8?q?1767558482832224019?= |
Series |
RISC-V: Fix warning in predicated.md
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
juzhe.zhong@rivai.ai
June 2, 2023, 3:04 a.m. UTC
From: Juzhe-Zhong <juzhe.zhong@rivai.ai>
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.
---
gcc/config/riscv/predicates.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Ok <juzhe.zhong@rivai.ai> 於 2023年6月2日 週五 11:05 寫道: > From: Juzhe-Zhong <juzhe.zhong@rivai.ai> > > 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. > > --- > 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 1ed84850e35..d14b1ca30bb 100644 > --- a/gcc/config/riscv/predicates.md > +++ b/gcc/config/riscv/predicates.md > @@ -31,7 +31,7 @@ > (ior (match_operand 0 "arith_operand") > (and (match_code "const_int") > (match_test "INTVAL (op) == GET_MODE_MASK (HImode) > - || INTVAL (op) == GET_MODE_MASK (SImode)")))) > + || UINTVAL (op) == GET_MODE_MASK (SImode)")))) > > (define_predicate "lui_operand" > (and (match_code "const_int") > -- > 2.36.1 > >
Committed, thanks Kito. Pan -----Original Message----- From: Gcc-patches <gcc-patches-bounces+pan2.li=intel.com@gcc.gnu.org> On Behalf Of Kito Cheng via Gcc-patches Sent: Friday, June 2, 2023 1:13 PM To: 钟居哲 <juzhe.zhong@rivai.ai> Cc: GCC Patches <gcc-patches@gcc.gnu.org>; Kito Cheng <kito.cheng@gmail.com>; Palmer Dabbelt <palmer@dabbelt.com>; Palmer Dabbelt <palmer@rivosinc.com>; Jeff Law <jeffreyalaw@gmail.com>; Robin Dapp <rdapp.gcc@gmail.com> Subject: Re: [PATCH] RISC-V: Fix warning in predicated.md Ok <juzhe.zhong@rivai.ai> 於 2023年6月2日 週五 11:05 寫道: > From: Juzhe-Zhong <juzhe.zhong@rivai.ai> > > 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. > > --- > 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 1ed84850e35..d14b1ca30bb 100644 > --- a/gcc/config/riscv/predicates.md > +++ b/gcc/config/riscv/predicates.md > @@ -31,7 +31,7 @@ > (ior (match_operand 0 "arith_operand") > (and (match_code "const_int") > (match_test "INTVAL (op) == GET_MODE_MASK (HImode) > - || INTVAL (op) == GET_MODE_MASK (SImode)")))) > + || UINTVAL (op) == GET_MODE_MASK > + (SImode)")))) > > (define_predicate "lui_operand" > (and (match_code "const_int") > -- > 2.36.1 > >
../../gcc/gcc/config/riscv/predicates.md: In function ‘bool arith_operand_or_mod e_mask(rtx, machine_mode)’: ../../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)
Oh there is 2 INTVAL (op) == GET_MODE_MASK...
I only change one .... :)
juzhe.zhong@rivai.ai
From: Andreas Schwab
Date: 2023-06-02 17:29
To: juzhe.zhong
CC: gcc-patches; kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc
Subject: Re: [PATCH] RISC-V: Fix warning in predicated.md
../../gcc/gcc/config/riscv/predicates.md: In function ‘bool arith_operand_or_mod
e_mask(rtx, machine_mode)’:
../../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)
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Hi, I fixed it :
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620462.html
Just feel free to commit it.
Thanks.
juzhe.zhong@rivai.ai
From: Andreas Schwab
Date: 2023-06-02 17:29
To: juzhe.zhong
CC: gcc-patches; kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc
Subject: Re: [PATCH] RISC-V: Fix warning in predicated.md
../../gcc/gcc/config/riscv/predicates.md: In function ‘bool arith_operand_or_mod
e_mask(rtx, machine_mode)’:
../../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)
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
diff --git a/gcc/config/riscv/predicates.md b/gcc/config/riscv/predicates.md index 1ed84850e35..d14b1ca30bb 100644 --- a/gcc/config/riscv/predicates.md +++ b/gcc/config/riscv/predicates.md @@ -31,7 +31,7 @@ (ior (match_operand 0 "arith_operand") (and (match_code "const_int") (match_test "INTVAL (op) == GET_MODE_MASK (HImode) - || INTVAL (op) == GET_MODE_MASK (SImode)")))) + || UINTVAL (op) == GET_MODE_MASK (SImode)")))) (define_predicate "lui_operand" (and (match_code "const_int")