From 3ec17be693a753bfbef072fa55a6d5cf88ddfe76 Mon Sep 17 00:00:00 2001 From: fredette Date: Thu, 6 Dec 2001 18:50:34 +0000 Subject: Applied a strength-reduction patch from gcc-current. The patch is in their revision 1.186, from schwab@suse.de, and said: Don't call reg_used_between_p if the insn from BL2 is after the insn from BL. This fixes a cc1 SEGV on sys/dev/scsipi/ch.c rev 1.48 under -O2 or -Os, seen on m68k and vax. --- gnu/dist/toolchain/gcc/loop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu') diff --git a/gnu/dist/toolchain/gcc/loop.c b/gnu/dist/toolchain/gcc/loop.c index aca291dd6b1..74839a5666e 100644 --- a/gnu/dist/toolchain/gcc/loop.c +++ b/gnu/dist/toolchain/gcc/loop.c @@ -4103,11 +4103,11 @@ strength_reduce (scan_start, end, loop_top, insn_count, in-between when biv_toal_increment returns nonzero both times but we test it here in case some day some real cfg analysis gets used to set always_computable. */ - && ((loop_insn_first_p (bl2->biv->insn, bl->biv->insn) - && no_labels_between_p (bl2->biv->insn, bl->biv->insn)) - || (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn, - bl2->biv->insn) - && no_jumps_between_p (bl->biv->insn, bl2->biv->insn))) + && (loop_insn_first_p (bl2->biv->insn, bl->biv->insn) + ? no_labels_between_p (bl2->biv->insn, bl->biv->insn) + : (! reg_used_between_p (bl->biv->src_reg, bl->biv->insn, + bl2->biv->insn) + && no_jumps_between_p (bl->biv->insn, bl2->biv->insn))) && validate_change (bl->biv->insn, &SET_SRC (single_set (bl->biv->insn)), copy_rtx (src), 0)) -- cgit