Commit ccf5f342 by Richard Kenner

(emit_libcall_block): Don't move insns that reference things set in

previous insns.

From-SVN: r5268
parent f8163c92
...@@ -2295,9 +2295,10 @@ emit_libcall_block (insns, target, result, equiv) ...@@ -2295,9 +2295,10 @@ emit_libcall_block (insns, target, result, equiv)
rtx prev, next, first, last, insn; rtx prev, next, first, last, insn;
/* First emit all insns that set pseudos. Remove them from the list as /* 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, 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) for (insn = insns; insn; insn = next)
{ {
...@@ -2309,7 +2310,9 @@ emit_libcall_block (insns, target, result, equiv) ...@@ -2309,7 +2310,9 @@ emit_libcall_block (insns, target, result, equiv)
&& REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER
&& (insn == insns && (insn == insns
|| (! reg_mentioned_p (SET_DEST (set), PATTERN (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)) if (PREV_INSN (insn))
NEXT_INSN (PREV_INSN (insn)) = next; NEXT_INSN (PREV_INSN (insn)) = next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment