rtl.h (FIND_REG_INC_NOTE): Call find_regno_note for REGs.
authorHans-Peter Nilsson <hp@axis.com>
Fri, 14 Sep 2001 22:29:13 +0000 (22:29 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Fri, 14 Sep 2001 22:29:13 +0000 (22:29 +0000)
* rtl.h (FIND_REG_INC_NOTE) [HAVE_PRE_INCREMENT
|| HAVE_PRE_DECREMENT || HAVE_POST_INCREMENT
|| HAVE_POST_DECREMENT]: Call find_regno_note for REGs.

From-SVN: r45617

gcc/ChangeLog
gcc/rtl.h

index aeb7d7ecd577eb6fd4ecd3702bce90e0633b0d50..b2e086ead96a38a9d42dac4838e96ede0b727a44 100644 (file)
@@ -1,4 +1,8 @@
-2001-09-15  Hans-Peter Nilsson  <hp@bitrange.com>
+2001-09-15  Hans-Peter Nilsson  <hp@axis.com>
+
+       * rtl.h (FIND_REG_INC_NOTE) [HAVE_PRE_INCREMENT
+       || HAVE_PRE_DECREMENT || HAVE_POST_INCREMENT
+       || HAVE_POST_DECREMENT]: Call find_regno_note for REGs.
 
        * reorg.c (fill_slots_from_thread): After call to
        steal_delay_list_from_target, update own_thread as new_thread may
index d99388866e0119e581e2b87a9e6311b1abdcba15..95063c4fbb7daa5ecc7d755d9ebce2bfbcd56b9a 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -944,7 +944,10 @@ extern unsigned int subreg_regno   PARAMS ((rtx));
 
 /* Don't continue this line--convex cc version 4.1 would lose.  */
 #if (defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT) || defined (HAVE_POST_INCREMENT) || defined (HAVE_POST_DECREMENT))
-#define FIND_REG_INC_NOTE(insn, reg) (find_reg_note ((insn), REG_INC, (reg)))
+#define FIND_REG_INC_NOTE(insn, reg)                           \
+  (reg != NULL_RTX && REG_P ((rtx) (reg))                      \
+   ? find_regno_note ((insn), REG_INC, REGNO ((rtx) (reg)))    \
+   : find_reg_note ((insn), REG_INC, (reg)))
 #else
 #define FIND_REG_INC_NOTE(insn, reg) 0
 #endif