diff options
author | Richard Stallman <rms@gnu.org> | 1992-09-26 22:48:08 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-09-26 22:48:08 +0000 |
commit | 4a5d0fb5959a5dd39e1fcf765de5912dfb2febd8 (patch) | |
tree | ec873348bd55969d04797de7e4caabcb2f6ba885 /gcc | |
parent | a6b65dff2f9dd9f84cec3c97644a2448c1ff7fe9 (diff) | |
download | gcc-4a5d0fb5959a5dd39e1fcf765de5912dfb2febd8.zip gcc-4a5d0fb5959a5dd39e1fcf765de5912dfb2febd8.tar.gz gcc-4a5d0fb5959a5dd39e1fcf765de5912dfb2febd8.tar.bz2 |
(eliminate_regs_in_insn): Rerecognize if move insn becomes a non-move.
From-SVN: r2257
Diffstat (limited to 'gcc')
-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 a6d95efb..42dedca 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2987,9 +2987,21 @@ eliminate_regs_in_insn (insn, replace) new_body = eliminate_regs (old_body, 0, replace ? insn : NULL_RTX); if (new_body != old_body) { - if (GET_CODE (old_body) != SET || GET_CODE (SET_SRC (old_body)) != PLUS - || ! validate_change (insn, &PATTERN (insn), new_body, 0)) + /* If we had a move insn but now we don't, rerecognize it. */ + if (GET_CODE (old_body) == SET && GET_CODE (SET_SRC (old_body)) == REG + && (GET_CODE (new_body) != SET + || GET_CODE (SET_SRC (new_body)) != REG)) + { + if (! validate_change (insn, &PATTERN (insn), new_body, 0)) + abort (); + } + /* If this was not a move insn, rerecognize. */ + else if (GET_CODE (old_body) != SET + || GET_CODE (SET_SRC (old_body)) != PLUS + || ! validate_change (insn, &PATTERN (insn), new_body, 0)) PATTERN (insn) = new_body; + /* ??? Is it really correct to store the new body anyway + if validate_change fails? Shouldn't this abort instead? */ if (replace && REG_NOTES (insn)) REG_NOTES (insn) = eliminate_regs (REG_NOTES (insn), 0, NULL_RTX); |