re PR bootstrap/41349 (bootstrap comparison failure on sparc-linux)
authorAdam Nemet <anemet@caviumnetworks.com>
Tue, 15 Sep 2009 22:18:34 +0000 (22:18 +0000)
committerAdam Nemet <nemet@gcc.gnu.org>
Tue, 15 Sep 2009 22:18:34 +0000 (22:18 +0000)
PR bootstrap/41349
* reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
trying to limit the extent of searches in the insn stream.

From-SVN: r151731

gcc/ChangeLog
gcc/reorg.c

index 8afcfd8f66ab77b0227ff100ca84502537c4a929..584f174adcce891e208e1727810775266df5d8ab 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-15  Adam Nemet  <anemet@caviumnetworks.com>
+
+       PR bootstrap/41349
+       * reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when
+       trying to limit the extent of searches in the insn stream.
+
 2009-09-15  Nathan Froyd  <froydnj@codesourcery.com>
            Jakub Jelinek  <jakub@redhat.com>
 
index 4453ccabca6e678a8c9f451bd8d4b4401a3a80e6..4871b0e8c29b22f9a341ca866a9594fe6100dd1d 100644 (file)
@@ -1630,13 +1630,14 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
   for (trial = PREV_INSN (target),
         insns_to_search = MAX_DELAY_SLOT_INSN_SEARCH;
        trial && insns_to_search > 0;
-       trial = PREV_INSN (trial), --insns_to_search)
+       trial = PREV_INSN (trial))
     {
       if (LABEL_P (trial))
        return 0;
 
-      if (! INSN_P (trial))
+      if (!NONDEBUG_INSN_P (trial))
        continue;
+      --insns_to_search;
 
       pat = PATTERN (trial);
       if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
@@ -1735,10 +1736,11 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
   for (trial = PREV_INSN (target),
         insns_to_search = MAX_DELAY_SLOT_INSN_SEARCH;
        trial && !LABEL_P (trial) && insns_to_search > 0;
-       trial = PREV_INSN (trial), --insns_to_search)
+       trial = PREV_INSN (trial))
     {
-      if (!INSN_P (trial))
+      if (!NONDEBUG_INSN_P (trial))
        continue;
+      --insns_to_search;
 
       pat = PATTERN (trial);
       if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)