Committed, thanks Kito. Pan
-----Original Message----- From: Gcc-patches <gcc-patches-bounces+pan2.li=intel....@gcc.gnu.org> On Behalf Of Kito Cheng via Gcc-patches Sent: Friday, June 2, 2023 1:13 PM To: 钟居哲 <juzhe.zh...@rivai.ai> Cc: GCC Patches <gcc-patches@gcc.gnu.org>; Kito Cheng <kito.ch...@gmail.com>; Palmer Dabbelt <pal...@dabbelt.com>; Palmer Dabbelt <pal...@rivosinc.com>; Jeff Law <jeffreya...@gmail.com>; Robin Dapp <rdapp....@gmail.com> Subject: Re: [PATCH] RISC-V: Fix warning in predicated.md Ok <juzhe.zh...@rivai.ai> 於 2023年6月2日 週五 11:05 寫道: > From: Juzhe-Zhong <juzhe.zh...@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 > >