From: Richard Kenner Date: Mon, 6 Sep 1993 17:27:49 +0000 (-0400) Subject: (emit_libcall_block): Don't move insns that reference things set in X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ccf5f34234559be0973687fc18c1801a467de6a2;p=gcc.git (emit_libcall_block): Don't move insns that reference things set in previous insns. From-SVN: r5268 --- diff --git a/gcc/optabs.c b/gcc/optabs.c index 2ff6d2bd043..cc742a40518 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2295,9 +2295,10 @@ emit_libcall_block (insns, target, result, equiv) rtx prev, next, first, last, insn; /* First emit all insns that set pseudos. Remove them from the list as - we go. Avoid insns that set pseudo which were referenced in previous + we go. Avoid insns that set pseudos which were referenced in previous insns. These can be generated by move_by_pieces, for example, - to update an address. */ + to update an address. Similarly, avoid insns that reference things + set in previous insns. */ for (insn = insns; insn; insn = next) { @@ -2309,7 +2310,9 @@ emit_libcall_block (insns, target, result, equiv) && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER && (insn == insns || (! reg_mentioned_p (SET_DEST (set), PATTERN (insns)) - && ! reg_used_between_p (SET_DEST (set), insns, insn)))) + && ! reg_used_between_p (SET_DEST (set), insns, insn) + && ! modified_in_p (SET_SRC (set), insns) + && ! modified_between_p (SET_SRC (set), insns, insn)))) { if (PREV_INSN (insn)) NEXT_INSN (PREV_INSN (insn)) = next;