From f5c82bff5ef2930583eccc008cf73653720987b5 Mon Sep 17 00:00:00 2001 From: Juzhe-Zhong Date: Fri, 2 Jun 2023 17:33:33 +0800 Subject: [PATCH] RISC-V: Fix warning in predicated.md MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 d14b1ca30bb0..04ca6ceabc71 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" -- 2.47.3