Commit 626d0d1d by Richard Kenner

*** empty log message ***

From-SVN: r1030
parent 09a1d028
...@@ -952,16 +952,37 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -952,16 +952,37 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
&& (temp3 = get_condition (insn, &temp4)) != 0 && (temp3 = get_condition (insn, &temp4)) != 0
&& can_reverse_comparison_p (temp3, insn)) && can_reverse_comparison_p (temp3, insn))
{ {
rtx target, seq; rtx temp6, target = 0, seq, init_insn = 0, init = temp2;
enum rtx_code code = reverse_condition (GET_CODE (temp3)); enum rtx_code code = reverse_condition (GET_CODE (temp3));
start_sequence (); start_sequence ();
target = emit_store_flag (gen_reg_rtx (GET_MODE (temp2)), code, /* It must be the case that TEMP2 is not modified in the range
XEXP (temp3, 0), XEXP (temp3, 1), [TEMP4, INSN). The one exception we make is if the insn
VOIDmode, before INSN sets TEMP2 to something which is also unchanged
(code == LTU || code == LEU in that range. In that case, we can move the initialization
|| code == GTU || code == GEU), 1); into our sequence. */
if ((temp5 = prev_active_insn (insn)) != 0
&& GET_CODE (temp5) == INSN
&& (temp6 = single_set (temp5)) != 0
&& rtx_equal_p (temp2, SET_DEST (temp6))
&& (CONSTANT_P (SET_SRC (temp6))
|| GET_CODE (SET_SRC (temp6)) == REG
|| GET_CODE (SET_SRC (temp6)) == SUBREG))
{
emit_insn (PATTERN (temp5));
init_insn = temp5;
init = SET_SRC (temp6);
}
if (CONSTANT_P (init)
|| ! reg_set_between_p (init, PREV_INSN (temp4), insn))
target = emit_store_flag (gen_reg_rtx (GET_MODE (temp2)), code,
XEXP (temp3, 0), XEXP (temp3, 1),
VOIDmode,
(code == LTU || code == LEU
|| code == GTU || code == GEU), 1);
/* If we can do the store-flag, do the addition or /* If we can do the store-flag, do the addition or
subtraction. */ subtraction. */
...@@ -987,6 +1008,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) ...@@ -987,6 +1008,10 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
emit_insns_before (seq, temp4); emit_insns_before (seq, temp4);
delete_insn (temp); delete_insn (temp);
if (init_insn)
delete_insn (init_insn);
next = NEXT_INSN (insn); next = NEXT_INSN (insn);
#ifdef HAVE_cc0 #ifdef HAVE_cc0
delete_insn (prev_nonnote_insn (insn)); delete_insn (prev_nonnote_insn (insn));
......
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