[PR97933] LRA: find correctly last empty dest block.
authorVladimir N. Makarov <vmakarov@redhat.com>
Tue, 24 Nov 2020 16:25:16 +0000 (11:25 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Tue, 24 Nov 2020 16:36:23 +0000 (11:36 -0500)
gcc/

2020-11-24  Vladimir Makarov  <vmakarov@redhat.com>

PR bootstrap/97933
* lra.c (lra_process_new_insns): Stop on the first real insn after
head of e->dest.

gcc/lra.c

index b318cfd7456531c2890340c674c429f65bd0cc7b..4ec0f46637699b5f880a89ae2250d8957a7f9476 100644 (file)
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -1908,11 +1908,9 @@ lra_process_new_insns (rtx_insn *insn, rtx_insn *before, rtx_insn *after,
                  tmp = NEXT_INSN (tmp);
                if (NOTE_INSN_BASIC_BLOCK_P (tmp))
                  tmp = NEXT_INSN (tmp);
-               for (curr = tmp;
-                    curr != NULL
-                      && (!INSN_P (curr) || BLOCK_FOR_INSN (curr) == e->dest);
-                    curr = NEXT_INSN (curr))
-                 ;
+               for (curr = tmp; curr != NULL; curr = NEXT_INSN (curr))
+                 if (INSN_P (curr))
+                   break;
                /* Do not put reload insns if it is the last BB
                   without actual insns.  In this case the reload insns
                   can get null BB after emitting.  */