Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-12 Thread Richard Biener
On Fri, 9 Jan 2015, Jakub Jelinek wrote: > On Fri, Jan 09, 2015 at 03:10:16PM +0100, Richard Biener wrote: > > Well, you have until the end of next week ;) For GIMPLE this is > > a switch with all cases going to the same basic-block, right? > > I think we optimize that in cleanup_control_expr_gra

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Jakub Jelinek
On Fri, Jan 09, 2015 at 03:10:16PM +0100, Richard Biener wrote: > Well, you have until the end of next week ;) For GIMPLE this is > a switch with all cases going to the same basic-block, right? > I think we optimize that in cleanup_control_expr_graph via the > single_succ_p case? No, it is a swit

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Richard Biener
On Fri, 9 Jan 2015, Jakub Jelinek wrote: > On Fri, Jan 09, 2015 at 11:59:44AM +0100, Richard Biener wrote: > > > If you want, I can try instead of disabling it for tablejumps > > > just move the label. > > > > Yeah, I'd prefer that - it can't be too difficult, no? > > So like this (tested just o

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Jakub Jelinek
On Fri, Jan 09, 2015 at 11:59:44AM +0100, Richard Biener wrote: > > If you want, I can try instead of disabling it for tablejumps > > just move the label. > > Yeah, I'd prefer that - it can't be too difficult, no? So like this (tested just on the testcase, fully bootstrap/regtest will follow)? >

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Richard Biener
On Fri, 9 Jan 2015, Jakub Jelinek wrote: > On Fri, Jan 09, 2015 at 11:15:14AM +0100, Richard Biener wrote: > > On Fri, 9 Jan 2015, Jakub Jelinek wrote: > > > > > On Fri, Jan 09, 2015 at 10:36:09AM +0100, Richard Biener wrote: > > > > I wonder why post_order_compute calls tidy_fallthru_edges at al

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Jakub Jelinek
On Fri, Jan 09, 2015 at 11:15:14AM +0100, Richard Biener wrote: > On Fri, 9 Jan 2015, Jakub Jelinek wrote: > > > On Fri, Jan 09, 2015 at 10:36:09AM +0100, Richard Biener wrote: > > > I wonder why post_order_compute calls tidy_fallthru_edges at all - won't > > > that break the just computed postord

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Richard Biener
On Fri, 9 Jan 2015, Jakub Jelinek wrote: > On Fri, Jan 09, 2015 at 10:36:09AM +0100, Richard Biener wrote: > > I wonder why post_order_compute calls tidy_fallthru_edges at all - won't > > that break the just computed postorder? > > Dunno, but I think it shouldn't break anything, the function does

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Jakub Jelinek
On Fri, Jan 09, 2015 at 10:36:09AM +0100, Richard Biener wrote: > I wonder why post_order_compute calls tidy_fallthru_edges at all - won't > that break the just computed postorder? Dunno, but I think it shouldn't break anything, the function doesn't remove any blocks, just in the typical case of a

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Richard Biener
On Fri, 9 Jan 2015, Richard Biener wrote: > On Fri, 9 Jan 2015, Jakub Jelinek wrote: > > > Hi! > > > > The following testcase is miscompiled on s390x. The problem is that there > > is massive cross-jumping going on, and after that post_order_compute > > decides to call tidy_fallthru_edges, incl

Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Richard Biener
On Fri, 9 Jan 2015, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled on s390x. The problem is that there > is massive cross-jumping going on, and after that post_order_compute > decides to call tidy_fallthru_edges, including on an edge from a bb ending > with a table jump to

[PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)

2015-01-09 Thread Jakub Jelinek
Hi! The following testcase is miscompiled on s390x. The problem is that there is massive cross-jumping going on, and after that post_order_compute decides to call tidy_fallthru_edges, including on an edge from a bb ending with a table jump to a bb with now a single successor where all the jump_ta