&& !find_reg_note (insn, REG_LABEL_TARGET, new_label))
add_reg_note (insn, REG_LABEL_TARGET, new_label);
}
+ while ((note = find_reg_note (insn, REG_LABEL_OPERAND, old_label))
+ != NULL_RTX)
+ XEXP (note, 0) = new_label;
}
else
{
gcc_assert (redirected);
}
else
- redirect_edge_succ (edge_in, bb);
+ {
+ if (edge_in->src != ENTRY_BLOCK_PTR)
+ {
+ /* For asm goto even splitting of fallthru edge might
+ need insn patching, as other labels might point to the
+ old label. */
+ rtx last = BB_END (edge_in->src);
+ if (last
+ && JUMP_P (last)
+ && edge_in->dest != EXIT_BLOCK_PTR
+ && extract_asm_operands (PATTERN (last)) != NULL_RTX
+ && patch_jump_insn (last, before, bb))
+ df_set_bb_dirty (edge_in->src);
+ }
+ redirect_edge_succ (edge_in, bb);
+ }
return bb;
}
&& (!single_succ_p (bb)
|| single_succ_edge (bb)->flags & EDGE_ABNORMAL))
{
- /* Keeping in mind SMALL_REGISTER_CLASSES and parameters in registers,
- we search backward and place the instructions before the first
- parameter is loaded. Do this for everyone for consistency and a
- presumption that we'll get better code elsewhere as well. */
+ /* Keeping in mind targets with small register classes and parameters
+ in registers, we search backward and place the instructions before
+ the first parameter is loaded. Do this for everyone for consistency
+ and a presumption that we'll get better code elsewhere as well. */
/* Since different machines initialize their parameter registers
in different orders, assume nothing. Collect the set of all