Commit 9c07e479 by Brendan Kehoe Committed by Brendan Kehoe

regmove.c (optimize_reg_copy_3): Make sure P is non-nil as we climb up the chain of insns.

	* regmove.c (optimize_reg_copy_3): Make sure P is non-nil as we
	climb up the chain of insns.

From-SVN: r29949
parent e8f9b13a
1999-10-13 Brendan Kehoe <brendan@cygnus.com>
* regmove.c (optimize_reg_copy_3): Make sure P is non-nil as we
climb up the chain of insns.
Wed Oct 13 10:20:58 1999 Richard Henderson <rth@cygnus.com>
* genrecog.c (write_subroutine): Careful for null trees.
......
......@@ -679,7 +679,7 @@ optimize_reg_copy_3 (insn, dest, src)
|| ! find_reg_note (insn, REG_DEAD, src_reg)
|| REG_N_SETS (src_no) != 1)
return;
for (p = PREV_INSN (insn); ! reg_set_p (src_reg, p); p = PREV_INSN (p))
for (p = PREV_INSN (insn); p && ! reg_set_p (src_reg, p); p = PREV_INSN (p))
{
if (GET_CODE (p) == CODE_LABEL || GET_CODE (p) == JUMP_INSN
|| (GET_CODE (p) == NOTE
......@@ -698,6 +698,9 @@ optimize_reg_copy_3 (insn, dest, src)
if (GET_RTX_CLASS (GET_CODE (p)) != 'i')
continue;
}
if (! p)
return;
if (! (set = single_set (p))
|| GET_CODE (SET_SRC (set)) != MEM
|| SET_DEST (set) != src_reg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment