diff options
author | Jeff Law <law@gcc.gnu.org> | 1997-12-06 17:31:01 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-06 17:31:01 -0700 |
commit | 956d69504d77d301015532d2f0564213f0efc706 (patch) | |
tree | ec80f8d1e46852ac1ba45aecdcda7201c302ac6f /gcc/flow.c | |
parent | 27b6b158c29b45fd80c2f104d5da1f4bc818d7ab (diff) | |
download | gcc-956d69504d77d301015532d2f0564213f0efc706.zip gcc-956d69504d77d301015532d2f0564213f0efc706.tar.gz gcc-956d69504d77d301015532d2f0564213f0efc706.tar.bz2 |
Merge from gcc-2.8
From-SVN: r16987
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1541,9 +1541,10 @@ propagate_block (old, first, last, final, significant, bnum) merged into a following memory address. */ #ifdef AUTO_INC_DEC { - register rtx x = PATTERN (insn); + register rtx x = single_set (insn); + /* Does this instruction increment or decrement a register? */ - if (final && GET_CODE (x) == SET + if (final && x != 0 && GET_CODE (SET_DEST (x)) == REG && (GET_CODE (SET_SRC (x)) == PLUS || GET_CODE (SET_SRC (x)) == MINUS) @@ -2679,7 +2680,7 @@ try_pre_increment_1 (insn) { /* Find the next use of this reg. If in same basic block, make it do pre-increment or pre-decrement if appropriate. */ - rtx x = PATTERN (insn); + rtx x = single_set (insn); HOST_WIDE_INT amount = ((GET_CODE (SET_SRC (x)) == PLUS ? 1 : -1) * INTVAL (XEXP (SET_SRC (x), 1))); int regno = REGNO (SET_DEST (x)); @@ -2689,8 +2690,7 @@ try_pre_increment_1 (insn) /* Don't do this if the reg dies, or gets set in y; a standard addressing mode would be better. */ && ! dead_or_set_p (y, SET_DEST (x)) - && try_pre_increment (y, SET_DEST (PATTERN (insn)), - amount)) + && try_pre_increment (y, SET_DEST (x), amount)) { /* We have found a suitable auto-increment and already changed insn Y to do it. |