From: Vladimir N. Makarov Date: Tue, 24 Nov 2020 16:25:16 +0000 (-0500) Subject: [PR97933] LRA: find correctly last empty dest block. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc8f0f1f88d95a284aa329fbc7e70e0b529eaa2a;p=gcc.git [PR97933] LRA: find correctly last empty dest block. gcc/ 2020-11-24 Vladimir Makarov PR bootstrap/97933 * lra.c (lra_process_new_insns): Stop on the first real insn after head of e->dest. --- diff --git a/gcc/lra.c b/gcc/lra.c index b318cfd7456..4ec0f466376 100644 --- 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. */