On 01/08/2016 09:17 PM, Jakub Jelinek wrote:
As mentioned in the PR, sched1 and reload add NOTE_INSN_DELETED notes
that are moved by shrink-wrapping in between some basic blocks and
later on we end up with a barrier after the notes. From comments above
cleanup_barriers pass I think it isnot invalid, and various other places
deal with notes before barrier, so this patch teaches rtl_merge_block
to deal with that too.
Hmm, there is something about this that bothers me. If the block did not
end in a jump, then why is there a barrier?
(insn 97 20 90 4 (cond_exec (eq (reg:CC 100 cc)
(const_int 0 [0]))
(set (mem/f:SI (plus:SI (reg/f:SI 0 r0 [orig:114 this ] [114])
(const_int 4 [0x4])) [2 this_5(D)->f+0 S4 A32])
(reg/f:SI 2 r2 [orig:110 b.0_4 ] [110]))) 69175.c:25 3729
{*p *thumb2_movsi_vfp}
(nil))
(note 90 97 91 NOTE_INSN_DELETED)
(note 91 90 101 NOTE_INSN_DELETED)
(barrier 101 91 23)
This seems like invalid incoming RTL - I don't mind the notes before the
barrier, but I do mind the absence of a jump. If the jump was removed
earlier, the barrier should have been removed at that point too IMO.
Bernd