> The propagate_for_debug change alone could fix it, we should never > fall through into next basic block. We are unforuntately not deleting > just jumps (which ought to appear at the end of bbs), but also > any other noop moves, which I think is unintentional, we have > delete_noop_moves that should clean that up instead (see the second patch).
Yes, I wondered several times about that. This clearly looks unintentional and I agree that it is worth fixing on the mainline, adding gcc_assert (at_end); to update_cfg_for_uncondjump in the process. > With the second patch, bootstrap succeeded even with gcc_assert (at_end); > in update_cfg_for_uncondjump, so either it is always at the end, or at > least very often, thus perhaps with the second patch being applied > in combine_instructions we could just for INSN_DELETED_P clear > last_combined_insn right away, meaning we want to propagate till end of > current bb. Something I don't understand at the moment: why moving last_combined_insn down to the next insn instead of up to the previous one when it has been deleted? Wouldn't the latter simplify things, in particular avoid setting it to NULL_RTX which looks rather awkward to me? -- Eric Botcazou