OSDN Git Service

Fix for PR 3128, IA-64 linux kernel miscompile
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Jun 2001 02:48:45 +0000 (02:48 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Jun 2001 02:48:45 +0000 (02:48 +0000)
* loop.c (strength_reduce): Move bl->all_reduced set before
check_ext_dependant_givs call.
(check_ext_dependant_givs): Clear bl->all_reduced when ignoring givs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43298 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/loop.c

index 91162d5..a6f3f68 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-12  Jim Wilson  <wilson@redhat.com>
+
+       * loop.c (strength_reduce): Move bl->all_reduced set before
+       check_ext_dependant_givs call.
+       (check_ext_dependant_givs): Clear bl->all_reduced when ignoring givs.
+
 2001-06-12  Alexandre Oliva  <aoliva@redhat.com>
 
        * doc/extend.texi (Function Attributes): Document SH's sp_switch
index fac9a84..ec8dc0a 100644 (file)
@@ -4306,6 +4306,11 @@ strength_reduce (loop, flags)
         provided all givs are reduced.  */
       bl->eliminable = loop_biv_eliminable_p (loop, bl, threshold, insn_count);
 
+      /* This will be true at the end, if all givs which depend on this
+        biv have been strength reduced.
+        We can't (currently) eliminate the biv unless this is so.  */
+      bl->all_reduced = 1;
+
       /* Check each extension dependent giv in this class to see if its
         root biv is safe from wrapping in the interior mode.  */
       check_ext_dependant_givs (bl, loop_info);
@@ -4313,11 +4318,6 @@ strength_reduce (loop, flags)
       /* Combine all giv's for this iv_class.  */
       combine_givs (regs, bl);
 
-      /* This will be true at the end, if all givs which depend on this
-        biv have been strength reduced.
-        We can't (currently) eliminate the biv unless this is so.  */
-      bl->all_reduced = 1;
-
       for (v = bl->giv; v; v = v->next_iv)
        {
          struct induction *tv;
@@ -6660,6 +6660,7 @@ check_ext_dependant_givs (bl, loop_info)
                         INSN_UID (v->insn), why);
              }
            v->ignore = 1;
+           bl->all_reduced = 0;
          }
       }
 }