diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-03-22 13:16:15 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-03-22 13:16:15 -0500 |
commit | 9b72fab4b724d273d7df2c94398adc1394ee52bb (patch) | |
tree | 25932fb8b56f77eb456b252767cc1b7e33c2a21b | |
parent | 6d518002821cf412acf044fbea7d5f3d1970db03 (diff) | |
download | gcc-9b72fab4b724d273d7df2c94398adc1394ee52bb.zip gcc-9b72fab4b724d273d7df2c94398adc1394ee52bb.tar.gz gcc-9b72fab4b724d273d7df2c94398adc1394ee52bb.tar.bz2 |
*** empty log message ***
From-SVN: r565
-rw-r--r-- | gcc/reorg.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c index 160e49a..f518fb8 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -2820,21 +2820,22 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely, We could check for more complex cases than those tested below, but it doesn't seem worth it. It might also be a good idea to try - to swap the two insns. That might do better. */ + to swap the two insns. That might do better. + + We can't do this if the next insn modifies our source, because that + would make the replacement into the insn invalid. This also + prevents updating the contents of a PRE_INC. */ if (GET_CODE (trial) == INSN && GET_CODE (pat) == SET && GET_CODE (SET_SRC (pat)) == REG && GET_CODE (SET_DEST (pat)) == REG) { rtx next = next_nonnote_insn (trial); - int our_dest = REGNO (SET_DEST (pat)); if (next && GET_CODE (next) == INSN - && GET_CODE (PATTERN (next)) == SET - && GET_CODE (SET_DEST (PATTERN (next))) == REG - && REGNO (SET_DEST (PATTERN (next))) != our_dest - && refers_to_regno_p (our_dest, our_dest + 1, - SET_SRC (PATTERN (next)), 0)) + && GET_CODE (PATTERN (next)) != USE + && ! reg_set_p (SET_DEST (pat), next) + && reg_referenced_p (SET_DEST (pat), PATTERN (next))) validate_replace_rtx (SET_DEST (pat), SET_SRC (pat), next); } } |