+2015-05-22 Mikhail Maltsev <maltsevm@gmail.com>
+
+ PR rtl-optimization/66237
+ * bb-reorder.c (fix_crossing_conditional_branches): Fix wrong
+ location of an "as_a" cast.
+
2015-05-22 Jeff Law <law@redhat.com>
* config/pa/pa.md (non-canonical shift-add insns): Remove.
if (crossing_edge)
{
- rtx_jump_insn *old_jump = as_a <rtx_jump_insn *> (BB_END (cur_bb));
+ rtx_insn *old_jump = BB_END (cur_bb);
/* Check to make sure the jump instruction is a
conditional jump. */
if (set_src && (GET_CODE (set_src) == IF_THEN_ELSE))
{
+ rtx_jump_insn *old_jump_insn =
+ as_a <rtx_jump_insn *> (old_jump);
+
if (GET_CODE (XEXP (set_src, 1)) == PC)
old_label = XEXP (set_src, 2);
else if (GET_CODE (XEXP (set_src, 2)) == PC)
emit_label (new_label);
gcc_assert (GET_CODE (old_label) == LABEL_REF);
- old_jump_target = old_jump->jump_target ();
+ old_jump_target = old_jump_insn->jump_target ();
new_jump = as_a <rtx_jump_insn *>
(emit_jump_insn (gen_jump (old_jump_target)));
new_jump->set_jump_target (old_jump_target);
/* Make old jump branch to new bb. */
- redirect_jump (old_jump, new_label, 0);
+ redirect_jump (old_jump_insn, new_label, 0);
/* Remove crossing_edge as predecessor of 'dest'. */