From 4de7b010038933dd6ca96bf186ca49f243d0def6 Mon Sep 17 00:00:00 2001 From: liuhongt Date: Sat, 26 Sep 2020 15:08:32 +0800 Subject: Extend special_memory_constraint. For operand with special_memory_constraint, there could be a wrapper for memory_operand. Extract mem for operand for conditional judgement like MEM_P, also for record_address_regs. gcc/ChangeLog: PR target/87767 * ira-costs.c (record_operand_costs): Extract memory operand from recog_data.operand[i] for record_address_regs. (record_reg_classes): Extract memory operand from OP for conditional judgement MEM_P. * ira.c (ira_setup_alts): Ditto. * lra-constraints.c (extract_mem_from_operand): New function. (satisfies_memory_constraint_p): Extract memory operand from OP for decompose_mem_address, return false when there's no memory operand inside OP. (process_alt_operands): Remove MEM_P (op) since it would be judged in satisfies_memory_constraint_p. * recog.c (asm_operand_ok): Extract memory operand from OP for judgement of memory_operand (OP, VOIDmode). (constrain_operands): Don't unwrapper unary operator when there's memory operand inside. * rtl.h (extract_mem_from_operand): New decl. --- gcc/ira.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ira.c') diff --git a/gcc/ira.c b/gcc/ira.c index 27d1b3c..a61138c 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -1868,7 +1868,7 @@ ira_setup_alts (rtx_insn *insn) case CT_MEMORY: case CT_SPECIAL_MEMORY: - if (MEM_P (op)) + if (MEM_P (extract_mem_from_operand (op))) goto op_success; win_p = true; break; -- cgit v1.1