Message ID | CABu31nNf=6n32=ZLeGxBhomHA5__WWDAeWLHKOGuNACR_7jQgw@mail.gmail.com |
---|---|
State | New |
Headers | show |
> And I can't get it to fail. I also can't find any place where the > label and jump table might get separated. I was expecting some trouble > with cross-jumping but it seems that it takes care of updating the > label reference, and skip_insns_after_block already expects the label > and table to be adjacent. As well as inside_basic_block_p and delete_dead_jumptables. > So let's just see if/what breaks... > > Bootstrapped&tested on powerpc64-unknown-linux-gnu (unix{,-m32}). > Bootstrapped&tested on x86_64-unknown-linux-gnu (unix{,-m32}). > Build&tested powerpc64 X mips-elf. > > OK for trunk? Yes, but I'd go one step farther and replace next_active_insn with NEXT_INSN in tablejump_p; however it's your call.
On Thu, 2013-05-30 at 00:15 +0200, Steven Bosscher wrote: > And I can't get it to fail. I also can't find any place where the > label and jump table might get separated. I was expecting some trouble > with cross-jumping but it seems that it takes care of updating the > label reference, and skip_insns_after_block already expects the label > and table to be adjacent. > > So let's just see if/what breaks... > > Bootstrapped&tested on powerpc64-unknown-linux-gnu (unix{,-m32}). > Bootstrapped&tested on x86_64-unknown-linux-gnu (unix{,-m32}). > Build&tested powerpc64 X mips-elf. I tested this with mips-mti-linux-gnu and mips-mti-elf by building cross compilers and testing and I did not hit the assert either. Steve Ellcey sellcey@imgtec.com
Index: rtlanal.c =================================================================== --- rtlanal.c (revision 199324) +++ rtlanal.c (working copy) @@ -2711,6 +2711,7 @@ tablejump_p (const_rtx insn, rtx *labelp, rtx *tab && (table = next_active_insn (label)) != NULL_RTX && JUMP_TABLE_DATA_P (table)) { + gcc_assert (table == NEXT_INSN (label)); if (labelp) *labelp = label; if (tablep)