aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/loongarch/predicates.md
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/loongarch/predicates.md')
-rw-r--r--gcc/config/loongarch/predicates.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/config/loongarch/predicates.md b/gcc/config/loongarch/predicates.md
index 34cf74d..7e4d8ab 100644
--- a/gcc/config/loongarch/predicates.md
+++ b/gcc/config/loongarch/predicates.md
@@ -135,6 +135,10 @@
(and (match_code "const_int")
(match_test "IN_RANGE (INTVAL (op), -16, 15)")))
+(define_predicate "const_uimm63_operand"
+ (and (match_code "const_int")
+ (match_test "IN_RANGE (INTVAL (op), 0, 63)")))
+
(define_predicate "const_imm10_operand"
(and (match_code "const_int")
(match_test "IMM10_OPERAND (INTVAL (op))")))
@@ -413,6 +417,11 @@
(match_operand 0 "low_bitmask_operand")
(match_operand 0 "ins_zero_bitmask_operand")))
+(define_predicate "mask_operand"
+ (ior (match_operand 0 "qi_mask_operand")
+ (match_operand 0 "hi_mask_operand")
+ (match_operand 0 "si_mask_operand")))
+
(define_predicate "const_call_insn_operand"
(match_code "const,symbol_ref,label_ref")
{
@@ -570,8 +579,8 @@
(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")