]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR99454] LRA: Process 0..9 constraints in process_address_1
authorVladimir N. Makarov <vmakarov@redhat.com>
Tue, 9 Mar 2021 14:05:05 +0000 (09:05 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Tue, 9 Mar 2021 14:06:17 +0000 (09:06 -0500)
We need to process 0..9 constraints to fetch the right op constraint in
the function.  Also 0..9 constraints gives unknown class constraint
class which can result in skipping address normalization for memory in asm.

gcc/ChangeLog:

PR target/99454
* lra-constraints.c (process_address_1): Process 0..9 constraints
in process_address_1.

gcc/lra-constraints.c

index 76e3ff7efe6962f8547ff50be4e85a00bbc6ee74..feff766c590523489645cdc1c7c3fd99e21f7ee0 100644 (file)
@@ -3452,6 +3452,10 @@ process_address_1 (int nop, bool check_only_p,
 
   constraint
     = skip_contraint_modifiers (curr_static_id->operand[nop].constraint);
+  if ('0' <= constraint[0] && constraint[0] <= '9')
+    constraint
+      = skip_contraint_modifiers (curr_static_id->operand
+                                 [constraint[0] - '0'].constraint);
   cn = lookup_constraint (constraint);
   if (insn_extra_address_constraint (cn)
       /* When we find an asm operand with an address constraint that