diff options
author | Vladimir N. Makarov <vmakarov@redhat.com> | 2021-03-10 16:15:08 -0500 |
---|---|---|
committer | Vladimir N. Makarov <vmakarov@redhat.com> | 2021-03-10 16:15:51 -0500 |
commit | d38bbb85117a9947797f10d459fe0c23ea479313 (patch) | |
tree | 756f3f77c138be4c80bb9fee630afbef560e3347 | |
parent | 8f316f41ce0fd90570f4d4444c29c639a322a0be (diff) | |
download | gcc-d38bbb85117a9947797f10d459fe0c23ea479313.zip gcc-d38bbb85117a9947797f10d459fe0c23ea479313.tar.gz gcc-d38bbb85117a9947797f10d459fe0c23ea479313.tar.bz2 |
[PR99422] LRA: Don't check unknown constraint, use X for empty constraint
Using CONSTRAINT__UNKNOWN was a bad idea, although it triggered a lot
hidden bugs. It is better to use X instead of empty constraint.
gcc/ChangeLog:
PR target/99422
* lra-constraints.c (process_address_1): Don't check unknown
constraint, use X for empty constraint.
-rw-r--r-- | gcc/lra-constraints.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 05cb493..9205826 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -3459,7 +3459,7 @@ process_address_1 (int nop, bool check_only_p, constraint = skip_contraint_modifiers (curr_static_id->operand[dup].constraint); } - cn = lookup_constraint (constraint); + cn = lookup_constraint (*constraint == '\0' ? "X" : constraint); if (insn_extra_address_constraint (cn) /* When we find an asm operand with an address constraint that doesn't satisfy address_operand to begin with, we clear @@ -3475,9 +3475,8 @@ 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 - && ((cn == CONSTRAINT__UNKNOWN && *constraint != 'g') - || (get_constraint_type (cn) == CT_FIXED_FORM - && constraint_satisfied_p (op, cn))))) + && 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))) |