Skip to content
Snippets Groups Projects
Commit 37ff12b9 authored by Juzhe-Zhong's avatar Juzhe-Zhong Committed by Pan Li
Browse files

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.
parent 4fe6e122
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
(ior (match_operand 0 "arith_operand") (ior (match_operand 0 "arith_operand")
(and (match_code "const_int") (and (match_code "const_int")
(match_test "INTVAL (op) == GET_MODE_MASK (HImode) (match_test "INTVAL (op) == GET_MODE_MASK (HImode)
|| INTVAL (op) == GET_MODE_MASK (SImode)")))) || UINTVAL (op) == GET_MODE_MASK (SImode)"))))
(define_predicate "lui_operand" (define_predicate "lui_operand"
(and (match_code "const_int") (and (match_code "const_int")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment