]> gcc.gnu.org Git - gcc.git/commitdiff
[LRA]: Process output stack pointer reloads before emitting reload insns
authorVladimir N. Makarov <vmakarov@redhat.com>
Mon, 14 Aug 2023 20:06:27 +0000 (16:06 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Mon, 14 Aug 2023 20:14:22 +0000 (16:14 -0400)
Previous patch setting up asserts for processing stack pointer reloads
caught an error in code moving sp offset.  This resulted in failure of
building aarch64 port. The code wrongly processed insns beyond the
output reloads of the current insn.  This patch fixes it.

gcc/ChangeLog:

* lra-constraints.cc (curr_insn_transform): Process output stack
pointer reloads before emitting reload insns.

gcc/lra-constraints.cc

index 8d9443adeb648636bacd08e25edc2d1f08fd2a9c..c718bedff32a55e8b1d388de4f1e18e11d20dab7 100644 (file)
@@ -4840,7 +4840,6 @@ curr_insn_transform (bool check_only_p)
        /* Most probably there are no enough registers to satisfy asm insn: */
        lra_asm_insn_error (curr_insn);
     }
-  lra_process_new_insns (curr_insn, before, after, "Inserting insn reload");
   if (goal_alt_out_sp_reload_p)
     {
       /* We have an output stack pointer reload -- update sp offset: */
@@ -4863,6 +4862,7 @@ curr_insn_transform (bool check_only_p)
          }
       lra_assert (done_p);
     }
+  lra_process_new_insns (curr_insn, before, after, "Inserting insn reload");
   return change_p;
 }
 
This page took 0.062236 seconds and 5 git commands to generate.