diff options
author | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-31 15:11:37 +0000 |
---|---|---|
committer | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-31 15:11:37 +0000 |
commit | 6b68797421ce9bf9e498e08f2a9c6aa4d3f03a4f (patch) | |
tree | 475d98a2798668b0b5903605f003d2129934ebcc /gcc/postreload.c | |
parent | 269dff0c7c7d5d06fbc9ba5985b93153c15c8cf7 (diff) | |
download | gcc-6b68797421ce9bf9e498e08f2a9c6aa4d3f03a4f.tar.gz |
* postreload.c (reload_combine): Check that REGY doesn't die in an
insn of the form (set (regx) (plus (regx) (regy))), ie REGX != REGY.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73148 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r-- | gcc/postreload.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c index f5a987a7f0d..362b50ebc13 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -718,7 +718,9 @@ reload_combine (void) ... (MEM (PLUS (REGZ) (REGY)))... . First, check that we have (set (REGX) (PLUS (REGX) (REGY))) - and that we know all uses of REGX before it dies. */ + and that we know all uses of REGX before it dies. + Also, explicitly check that REGX != REGY; our life information + does not yet show whether REGY changes in this insn. */ set = single_set (insn); if (set != NULL_RTX && GET_CODE (SET_DEST (set)) == REG @@ -728,6 +730,7 @@ reload_combine (void) && GET_CODE (SET_SRC (set)) == PLUS && GET_CODE (XEXP (SET_SRC (set), 1)) == REG && rtx_equal_p (XEXP (SET_SRC (set), 0), SET_DEST (set)) + && !rtx_equal_p (XEXP (SET_SRC (set), 1), SET_DEST (set)) && last_label_ruid < reg_state[REGNO (SET_DEST (set))].use_ruid) { rtx reg = SET_DEST (set); |