diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-08 13:14:32 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-08 13:14:32 +0000 |
commit | 323c781a2449b54cc546b57f6f5fb8d9be15c876 (patch) | |
tree | 24a54ea2ffe64ccf6deedae31c29ed5838ba2767 /gcc/reload1.c | |
parent | e3e0d3b7acb58e0d86cb3fde4d7b42f38b01b2ca (diff) | |
download | gcc-323c781a2449b54cc546b57f6f5fb8d9be15c876.tar.gz |
* reload1.c (emit_reload_insns): When performing expensive
optimizations, do not output the last reload insn if OLD is
not the dest of NSN and is in the src and is clobbered by INSN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index fc399dfa3cb..65e5d65f26b 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -6755,8 +6755,20 @@ emit_reload_insns (insn) /* Output the last reload insn. */ if (! special) - gen_reload (old, reloadreg, reload_opnum[j], - reload_when_needed[j]); + { + rtx set; + + /* Don't output the last reload if OLD is not the dest of + INSN and is in the src and is clobbered by INSN. */ + if (! flag_expensive_optimizations + || GET_CODE (old) != REG + || !(set = single_set (insn)) + || rtx_equal_p (old, SET_DEST (set)) + || !reg_mentioned_p (old, SET_SRC (set)) + || !regno_clobbered_p (REGNO (old), insn)) + gen_reload (old, reloadreg, reload_opnum[j], + reload_when_needed[j]); + } #ifdef PRESERVE_DEATH_INFO_REGNO_P /* If final will look at death notes for this reg, |