public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed][LRA]: Process output stack pointer reloads before emitting reload insns
@ 2023-08-14 20:14 Vladimir Makarov
  0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2023-08-14 20:14 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 140 bytes --]

The patch fixes a failure of building aarch64 port with my yesterday patch.

The patch was successfully bootstrapped on x86-64 and aarch64.

[-- Attachment #2: z --]
[-- Type: text/plain, Size: 1398 bytes --]

commit c4760c0161f92b92361feba11836e3d066bb330c
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Mon Aug 14 16:06:27 2023 -0400

    [LRA]: Process output stack pointer reloads before emitting reload insns
    
    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.

diff --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc
index 8d9443adeb6..c718bedff32 100644
--- a/gcc/lra-constraints.cc
+++ b/gcc/lra-constraints.cc
@@ -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;
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-14 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-14 20:14 [pushed][LRA]: Process output stack pointer reloads before emitting reload insns Vladimir Makarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).