diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-05-20 16:44:05 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1996-05-20 16:44:05 +0000 |
commit | 80bda46801005054d082eb5e41113611855003c4 (patch) | |
tree | 1e8bcfc31111a0cba816c5ba13059a7fd0138c5b /gcc/reorg.c | |
parent | 3228eb2ff5739fdbc66ecc2a36f3d7435bc5ca98 (diff) | |
download | gcc-80bda46801005054d082eb5e41113611855003c4.tar.gz |
* reorg.c (relax_delay_slots): Call update_block before
redirecting a branch past a redundant insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12060 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r-- | gcc/reorg.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c index 11e5fc7c1ae..ab303363a97 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -4066,11 +4066,20 @@ relax_delay_slots (first) if (trial && GET_CODE (PATTERN (trial)) != SEQUENCE && redundant_insn (trial, insn, 0)) { - trial = next_active_insn (trial); - if (trial == 0) - target_label = find_end_label (); - else - target_label = get_label_before (trial); + rtx tmp; + + /* Figure out where to emit the special USE insn so we don't + later incorrectly compute register live/death info. */ + tmp = next_active_insn (trial); + if (tmp == 0) + tmp = find_end_label (); + + /* Insert the special USE insn and update dataflow info. */ + update_block (trial, tmp); + + /* Now emit a label before the special USE insn, and + redirect our jump to the new label. */ + target_label = get_label_before (PREV_INSN (tmp)); reorg_redirect_jump (delay_insn, target_label); next = insn; continue; |