From: wilson Date: Wed, 13 Jun 2001 02:48:45 +0000 (+0000) Subject: Fix for PR 3128, IA-64 linux kernel miscompile X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=af10ea53121a86f956b160e5872af0930ae931ab Fix for PR 3128, IA-64 linux kernel miscompile * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91162d51ee9..a6f3f681024 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-06-12 Jim Wilson + + * 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 * doc/extend.texi (Function Attributes): Document SH's sp_switch diff --git a/gcc/loop.c b/gcc/loop.c index fac9a840bc8..ec8dc0ac261 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -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; } } }