build the store_flag insn directly. */
if (cond_complex)
- cond = XEXP (SET_SRC (PATTERN (if_info->jump)), 0);
+ cond = XEXP (SET_SRC (pc_set (if_info->jump)), 0);
if ((if_info->cond_earliest == if_info->jump || cond_complex)
&& (normalize == 0 || STORE_FLAG_VALUE == normalize))
{
rtx head, end, jump, earliest, old_dest;
+ /* No code movement can occur if we'd be scrogging EH regions.
+ Within MERGE_BB, ensure that we've not got stray EH_BEG or EH_END
+ notes within the block. Between the blocks, checking that the end
+ region numbers match ensures that we won't disrupt the nesting
+ between regions. */
+ if (merge_bb->eh_beg != merge_bb->eh_end
+ || merge_bb->eh_end != test_bb->eh_end)
+ return FALSE;
+
jump = test_bb->end;
/* Find the extent of the real code in the merge block. */
/* ??? bb->local_set is only valid during calculate_global_regs_live,
so we must recompute usage for MERGE_BB. Not so bad, I suppose,
since we've already asserted that MERGE_BB is small. */
- propagate_block (merge_bb, tmp, merge_set, 0);
+ propagate_block (merge_bb, tmp, merge_set, merge_set, 0);
/* For small register class machines, don't lengthen lifetimes of
hard registers before reload. */
Moreover, we're interested in the insns live from OTHER_BB. */
COPY_REG_SET (test_live, other_bb->global_live_at_start);
- pbi = init_propagate_block_info (test_bb, test_live, test_set, 0);
+ pbi = init_propagate_block_info (test_bb, test_live, test_set, test_set,
+ 0);
for (insn = jump; ; insn = prev)
{