Pushed to r16-5265.

Thanks!

在 2025/11/10 下午3:20, zhaozhou 写道:
The predicate checks if the operand is PLUS(symbol_ref, const_int), but
the match (match_operand 0/1) is not equal XEXP(op, 0/1). It should be
adjusted to use match_test and pass XEXP(op, 0/1) into the constraint
function.

gcc/ChangeLog:

        * config/loongarch/predicates.md: Update ops.
---
  gcc/config/loongarch/predicates.md | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/loongarch/predicates.md 
b/gcc/config/loongarch/predicates.md
index 8460618b501..957215ad89a 100644
--- a/gcc/config/loongarch/predicates.md
+++ b/gcc/config/loongarch/predicates.md
@@ -575,8 +575,8 @@ (define_predicate "symbolic_pcrel_operand"
(define_predicate "symbolic_pcrel_offset_operand"
    (and (match_code "plus")
-       (match_operand 0 "symbolic_pcrel_operand")
-       (match_operand 1 "const_int_operand")))
+       (match_test "symbolic_pcrel_operand (XEXP (op, 0), mode)")
+       (match_test "const_int_operand (XEXP (op, 1), mode)")))
(define_predicate "mem_simple_ldst_operand"
    (match_code "mem")

Reply via email to