Commit 2219e921 by J"orn Rennecke Committed by Richard Henderson

regmove.c (fixup_match_1): Don't move INSN in front of P if it would end up in…

regmove.c (fixup_match_1): Don't move INSN in front of P if it would end up in the shadow of a live flags...

        * regmove.c (fixup_match_1): Don't move INSN in front of P if
        it would end up in the shadow of a live flags regsiter.

From-SVN: r29034
parent 6c2a1180
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1737,6 +1737,13 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number, ...@@ -1737,6 +1737,13 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number,
if ((dst_note = find_regno_note (p, REG_DEAD, REGNO (dst))) if ((dst_note = find_regno_note (p, REG_DEAD, REGNO (dst)))
&& (GET_MODE (XEXP (dst_note, 0)) == GET_MODE (dst))) && (GET_MODE (XEXP (dst_note, 0)) == GET_MODE (dst)))
{ {
/* If we would be moving INSN, check that we won't move it
into the shadow of a live a live flags register. */
/* ??? We only try to move it in front of P, although
we could move it anywhere between OVERLAP and P. */
if (overlap && GET_MODE (PREV_INSN (p)) != VOIDmode)
break;
if (! src_note) if (! src_note)
{ {
rtx q; rtx q;
...@@ -1844,8 +1851,11 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number, ...@@ -1844,8 +1851,11 @@ fixup_match_1 (insn, set, src, src_subreg, dst, backward, operand_number,
break; break;
if (! src_note && reg_overlap_mentioned_p (src, PATTERN (p))) if (! src_note && reg_overlap_mentioned_p (src, PATTERN (p)))
{ {
/* INSN was already checked to be movable when /* INSN was already checked to be movable wrt. the registers that it
we found no REG_DEAD note for src on it. */ sets / uses when we found no REG_DEAD note for src on it, but it
still might clobber the flags register. We'll have to check that
we won't insert it into the shadow of a live flags register when
we finally know where we are to move it. */
overlap = p; overlap = p;
src_note = find_reg_note (p, REG_DEAD, src); src_note = find_reg_note (p, REG_DEAD, src);
} }
......
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