aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-05-01 00:21:29 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-01 00:21:29 -0700
commit5e9e738cd2a82d340ab39261302d8d8b9ea945bd (patch)
tree94bfea772e4228834196f5ee762ed732c516557b /gcc/flow.c
parentc4686982aaf87c31ecb76bb361ec3a6685913e4b (diff)
downloadgcc-5e9e738cd2a82d340ab39261302d8d8b9ea945bd.zip
gcc-5e9e738cd2a82d340ab39261302d8d8b9ea945bd.tar.gz
gcc-5e9e738cd2a82d340ab39261302d8d8b9ea945bd.tar.bz2
* flow.c (propagate_one_insn): Mark sets even when the insn is dead.
From-SVN: r33564
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 16f008c..73cb173 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -3364,6 +3364,15 @@ propagate_one_insn (pbi, insn)
delete it. */
if ((flags & PROP_KILL_DEAD_CODE) && insn_is_dead)
{
+ /* Record sets. Do this even for dead instructions, since they
+ would have killed the values if they hadn't been deleted. */
+ mark_set_regs (pbi, PATTERN (insn), insn);
+
+ /* CC0 is now known to be dead. Either this insn used it,
+ in which case it doesn't anymore, or clobbered it,
+ so the next insn can't use it. */
+ pbi->cc0_live = 0;
+
if (libcall_is_dead)
{
prev = propagate_block_delete_libcall (pbi->bb, insn, note);
@@ -3372,11 +3381,6 @@ propagate_one_insn (pbi, insn)
else
propagate_block_delete_insn (pbi->bb, insn);
- /* CC0 is now known to be dead. Either this insn used it,
- in which case it doesn't anymore, or clobbered it,
- so the next insn can't use it. */
- pbi->cc0_live = 0;
-
return prev;
}