aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-09-27 03:28:28 +0000
committerRichard Stallman <rms@gnu.org>1992-09-27 03:28:28 +0000
commit0ba846c771eba2229f64fc22b3bf86ceb70e4557 (patch)
tree04ad294e6a5342b8564bd37c4afae06a405777ff /gcc
parent4a5d0fb5959a5dd39e1fcf765de5912dfb2febd8 (diff)
downloadgcc-0ba846c771eba2229f64fc22b3bf86ceb70e4557.zip
gcc-0ba846c771eba2229f64fc22b3bf86ceb70e4557.tar.gz
gcc-0ba846c771eba2229f64fc22b3bf86ceb70e4557.tar.bz2
(eliminate_regs_in_insn): If recognition fails on modified insn,
go ahead and modify just the same. From-SVN: r2258
Diffstat (limited to 'gcc')
-rw-r--r--gcc/reload1.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 42dedca..2d6b43b 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2988,20 +2988,22 @@ eliminate_regs_in_insn (insn, replace)
if (new_body != old_body)
{
/* 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 ((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 this was an add insn before, rerecognize. */
+ ||
+ (GET_CODE (old_body) == SET
+ && GET_CODE (SET_SRC (old_body)) == PLUS))
{
if (! validate_change (insn, &PATTERN (insn), new_body, 0))
- abort ();
+ /* If recognition fails, store the new body anyway.
+ It's normal to have recognition failures here
+ due to bizarre memory addresses; reloading will fix them. */
+ PATTERN (insn) = new_body;
}
- /* 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))
+ else
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);