self@BAYES.ARC.NASA.GOV (Matthew Self) (04/01/89)
Here are some more patches to loop.c which remove the MINUS vs. COMPARE bugs found by Michael Meissner. This patch combines the patches from my previous posting (revised) and a patch by Jim Wilson. *** loop.c.tar Fri Mar 31 15:33:33 1989 --- loop.c Fri Mar 31 15:34:44 1989 *************** *** 4104,4109 **** if (GET_CODE (SET_SRC (PATTERN (p))) == REG) tested_before_loop = SET_SRC (PATTERN (p)); ! else if (GET_CODE (SET_SRC (PATTERN (p))) == MINUS ! && GET_CODE (XEXP (SET_SRC (PATTERN (p)), 1)) == REG && XEXP (SET_SRC (PATTERN (p)), 1) == const0_rtx) tested_before_loop = XEXP (SET_SRC (PATTERN (p)), 0); --- 4104,4109 ---- if (GET_CODE (SET_SRC (PATTERN (p))) == REG) tested_before_loop = SET_SRC (PATTERN (p)); ! else if (GET_CODE (SET_SRC (PATTERN (p))) == COMPARE ! && GET_CODE (XEXP (SET_SRC (PATTERN (p)), 0)) == REG && XEXP (SET_SRC (PATTERN (p)), 1) == const0_rtx) tested_before_loop = XEXP (SET_SRC (PATTERN (p)), 0); *************** *** 4486,4490 **** { /* Replace biv with the giv's reduced register. */ ! SET_SRC (PATTERN (insn)) = gen_rtx (MINUS, GET_MODE (v->new_reg), v->new_reg, v->add_val); --- 4486,4490 ---- { /* Replace biv with the giv's reduced register. */ ! SET_SRC (PATTERN (insn)) = gen_rtx (COMPARE, GET_MODE (v->new_reg), v->new_reg, v->add_val);