rtlanal.c (find_reg_note): Ignore notes that are not on on insns of class 'i'.
authorMichael Meissner <meissner@cygnus.com>
Wed, 13 May 1998 22:10:04 +0000 (22:10 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 13 May 1998 22:10:04 +0000 (16:10 -0600)
        * rtlanal.c (find_reg_note): Ignore notes that are not on on
        insns of class 'i'.
        (find_regno_note): Likewise.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r19733

gcc/ChangeLog
gcc/rtlanal.c

index f52744005211354dfeeedab950b07fe41c4bfc79..d692794932d9b300765eb3e26e55c3b944b4416d 100644 (file)
@@ -25,6 +25,10 @@ Wed May 13 13:09:19 1998  Jim Wilson  <wilson@cygnus.com>
 Wed May 13 15:28:59 1998  Michael Meissner  <meissner@cygnus.com>
                          Jeff Law <law@cygnus.com>
 
+       * rtlanal.c (find_reg_note): Ignore notes that are not on on
+       insns of class 'i'.
+       (find_regno_note): Likewise.
+
        * Makefile.in (stor-layout.o): Depend on except.h
        (varasm.o, function.o): Likewise.
        (expr.o): Depend on except.h, modemap.def and hard-reg-set.h.
index e2fc66a906e9c0c5aa8c80a987a6ba9cd3171212..b410553f327cad14ac3b622835988900f87cb5ff 100644 (file)
@@ -1259,6 +1259,10 @@ find_reg_note (insn, kind, datum)
 {
   register rtx link;
 
+  /* Ignore anything that is not an INSN, JUMP_INSN or CALL_INSN.  */
+  if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+    return 0;
+
   for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
     if (REG_NOTE_KIND (link) == kind
        && (datum == 0 || datum == XEXP (link, 0)))
@@ -1279,6 +1283,10 @@ find_regno_note (insn, kind, regno)
 {
   register rtx link;
 
+  /* Ignore anything that is not an INSN, JUMP_INSN or CALL_INSN.  */
+  if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+    return 0;
+
   for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
     if (REG_NOTE_KIND (link) == kind
        /* Verify that it is a register, so that scratch and MEM won't cause a