aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-09-06 13:27:49 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-09-06 13:27:49 -0400
commitccf5f34234559be0973687fc18c1801a467de6a2 (patch)
tree82d33fecadde63b56050ff0555b5d2453b36ad97
parentf8163c9219d854d89c9f46eab38e650596c7e9a6 (diff)
downloadgcc-ccf5f34234559be0973687fc18c1801a467de6a2.zip
gcc-ccf5f34234559be0973687fc18c1801a467de6a2.tar.gz
gcc-ccf5f34234559be0973687fc18c1801a467de6a2.tar.bz2
(emit_libcall_block): Don't move insns that reference things set in
previous insns. From-SVN: r5268
-rw-r--r--gcc/optabs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 2ff6d2b..cc742a4 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;