]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(try_pre_increment_1): Don't try to create a pre-increment expression
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 16 May 1994 20:21:39 +0000 (16:21 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 16 May 1994 20:21:39 +0000 (16:21 -0400)
if the register dies in the succeeding insn.

From-SVN: r7308

gcc/flow.c

index 71d15ad7014f85bb9d025b52405d795743abab67..448608cdc52a2fa897ecf597dd867f989f88d983 100644 (file)
@@ -2516,6 +2516,9 @@ try_pre_increment_1 (insn)
   rtx y = reg_next_use[regno];
   if (y != 0
       && BLOCK_NUM (y) == BLOCK_NUM (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))
     {