From b5d27be7d7803e6537c3f0dce4abfe62a8b60643 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Fri, 23 Oct 1992 06:02:13 +0000 Subject: [PATCH] (record_biv): Clear total_benefit field of new iv_class. (get_condition): Verify op 2 of source is label_ref before looking within. From-SVN: r2566 --- gcc/loop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/loop.c b/gcc/loop.c index 232b88290d1..6ffa6bced18 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -4122,6 +4122,7 @@ record_biv (v, insn, dest_reg, inc_val, mult_val, bl->eliminable = 0; bl->nonneg = 0; bl->reversed = 0; + bl->total_benefit = 0; /* Add this class to loop_iv_list. */ bl->next = loop_iv_list; @@ -6255,7 +6256,8 @@ get_condition (jump, earliest) /* If this branches to JUMP_LABEL when the condition is false, reverse the condition. */ - if (XEXP (XEXP (SET_SRC (PATTERN (jump)), 2), 0) == JUMP_LABEL (jump)) + if (GET_CODE (XEXP (SET_SRC (PATTERN (jump)), 2)) == LABEL_REF + && XEXP (XEXP (SET_SRC (PATTERN (jump)), 2), 0) == JUMP_LABEL (jump)) code = reverse_condition (code), did_reverse_condition ^= 1; /* If we are comparing a register with zero, see if the register is set -- 2.30.2