Fix for PR 3128, IA-64 linux kernel miscompile

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.

From-SVN: r43298
This commit is contained in:
Jim Wilson 2001-06-13 02:48:45 +00:00 committed by Jim Wilson
parent fe2ee7c4a7
commit 97ebd24c89
2 changed files with 12 additions and 5 deletions

View 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

View 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;
}
}
}