@@ -2129,19 +2129,16 @@
This is more efficient than a dispatch table on most machines.
The last "index--" is redundant but the code is trivially dead
and will be cleaned up by later passes. */
- rtx index = force_reg (index_mode, dispatch_index);
+ rtx index = copy_to_mode_reg (index_mode, dispatch_index);
rtx zero = CONST0_RTX (index_mode);
for (int i = 0; i < ncases; i++)
{
tree elt = VEC_index (tree, dispatch_table, i);
rtx lab = label_rtx (CASE_LABEL (elt));
do_jump_if_equal (index_mode, index, zero, lab, 0);
- rtx tmp = expand_simple_binop (index_mode, MINUS,
- index, CONST1_RTX (index_mode),
- index, 0, OPTAB_DIRECT);
- gcc_assert (REG_P (tmp));
- if (tmp != index)
- emit_move_insn (index, tmp);
+ force_expand_binop (index_mode, code_to_optab (MINUS),
+ index, CONST1_RTX (index_mode),
+ index, 0, OPTAB_DIRECT);
}
}
else