Commit dc9e9f3f by Richard Earnshaw Committed by Richard Earnshaw

(jump_optimize_1): More accurately detect casesi insns.

From-SVN: r30099
parent 2cd6f3b3
Wed Oct 20 10:46:41 1999 Richard Earnshaw (rearnsha@arm.com)
* jump.c (jump_optimize_1): More accurately detect casesi insns.
Tue Oct 19 23:43:50 1999 Jeffrey A Law (law@cygnus.com)
* pa.md (call, call_value): Do not emit a blockage after restoring
......
......@@ -367,19 +367,23 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
int diff_vec_p = GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC;
int len = XVECLEN (pat, diff_vec_p);
rtx dispatch = prev_real_insn (insn);
rtx set;
for (i = 0; i < len; i++)
if (XEXP (XVECEXP (pat, diff_vec_p, i), 0)
!= XEXP (XVECEXP (pat, diff_vec_p, 0), 0))
break;
if (i == len
&& dispatch != 0
&& GET_CODE (dispatch) == JUMP_INSN
&& JUMP_LABEL (dispatch) != 0
/* Don't mess with a casesi insn. */
&& !(GET_CODE (PATTERN (dispatch)) == SET
&& (GET_CODE (SET_SRC (PATTERN (dispatch)))
== IF_THEN_ELSE))
/* Don't mess with a casesi insn.
XXX according to the comment before computed_jump_p(),
all casesi insns should be a parallel of the jump
and a USE of a LABEL_REF. */
&& ! ((set = single_set (dispatch)) != NULL
&& (GET_CODE (SET_SRC (set)) == IF_THEN_ELSE))
&& next_real_insn (JUMP_LABEL (dispatch)) == insn)
{
redirect_tablejump (dispatch,
......
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