Skip to content

Commit 522f07d

Browse files
zhaozhouchenglulu326
authored andcommitted
LoongArch: Fix predicate for symbolic_pcrel_offset_operand.
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.
1 parent f77f479 commit 522f07d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcc/config/loongarch/predicates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,8 @@
575575

576576
(define_predicate "symbolic_pcrel_offset_operand"
577577
(and (match_code "plus")
578-
(match_operand 0 "symbolic_pcrel_operand")
579-
(match_operand 1 "const_int_operand")))
578+
(match_test "symbolic_pcrel_operand (XEXP (op, 0), mode)")
579+
(match_test "const_int_operand (XEXP (op, 1), mode)")))
580580

581581
(define_predicate "mem_simple_ldst_operand"
582582
(match_code "mem")

0 commit comments

Comments
 (0)