diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-11 20:08:04 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-11 20:08:04 +0000 |
commit | 4187ae6d509663c12613e100bd045d74f936572b (patch) | |
tree | e3f47db684b16470dfb3de36d6dfa30d84afe0f6 /gcc/regmove.c | |
parent | c872ef7190b3a6b3d927c3839779e0db9522dab3 (diff) | |
download | ppe42-gcc-4187ae6d509663c12613e100bd045d74f936572b.tar.gz ppe42-gcc-4187ae6d509663c12613e100bd045d74f936572b.zip |
* regmove.c (regmove_optimize): Suppress the optimization for
unchanging destination register. Add comment above function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index a151d6f2320..910c422ee4f 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -1060,6 +1060,12 @@ fixup_match_2 (insn, dst, src, offset, regmove_dump_file) return 0; } +/* Main entry for the register move optimization. + F is the first instruction. + NREGS is one plus the highest pseudo-reg number used in the instruction. + REGMOVE_DUMP_FILE is a stream for output of a trace of actions taken + (or 0 if none should be output). */ + void regmove_optimize (f, nregs, regmove_dump_file) rtx f; @@ -1282,7 +1288,8 @@ regmove_optimize (f, nregs, regmove_dump_file) if (GET_CODE (dst) != REG || REGNO (dst) < FIRST_PSEUDO_REGISTER - || REG_LIVE_LENGTH (REGNO (dst)) < 0) + || REG_LIVE_LENGTH (REGNO (dst)) < 0 + || RTX_UNCHANGING_P (dst)) continue; /* If the operands already match, then there is nothing to do. */ |