aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorVladimir N. Makarov <vmakarov@redhat.com>2021-03-05 11:41:25 -0500
committerVladimir N. Makarov <vmakarov@redhat.com>2021-03-05 11:44:06 -0500
commit9105757a59b890194ebf5b4fcbacd58db34ef332 (patch)
tree6078c3050951a6d80ed41effc1954f87182f5926 /gcc/lra-constraints.c
parentb8188b7d7382e4a74af5dd6a125e76e8d43a68a5 (diff)
downloadgcc-9105757a59b890194ebf5b4fcbacd58db34ef332.zip
gcc-9105757a59b890194ebf5b4fcbacd58db34ef332.tar.gz
gcc-9105757a59b890194ebf5b4fcbacd58db34ef332.tar.bz2
[PR99378] LRA: Skip decomposing address for asm insn operand with unknown constraint.
Function get_constraint_type returns CT__UNKNOWN for empty constraint and CT_FIXED_FORM for "X". So process_address_1 skipped decompose_mem_address only for "X" constraint. To do the same for empty constraint, skip decompose_mem_address for CT__UNKNOWN. gcc/ChangeLog: PR target/99378 * lra-constraints.c (process_address_1): Skip decomposing address for asm insn operand with unknown constraint. gcc/testsuite/ChangeLog: PR target/99378 * gcc.target/i386/pr99123-2.c: New.
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 51acf7f..9253690 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -3450,8 +3450,9 @@ process_address_1 (int nop, bool check_only_p,
i.e. bcst_mem_operand in i386 backend. */
else if (MEM_P (mem)
&& !(INSN_CODE (curr_insn) < 0
- && get_constraint_type (cn) == CT_FIXED_FORM
- && constraint_satisfied_p (op, cn)))
+ && (cn == CONSTRAINT__UNKNOWN
+ || (get_constraint_type (cn) == CT_FIXED_FORM
+ && constraint_satisfied_p (op, cn)))))
decompose_mem_address (&ad, mem);
else if (GET_CODE (op) == SUBREG
&& MEM_P (SUBREG_REG (op)))